Explorar el Código

Remove faulty double whitesapce nightscout/Trio#536

Deniz Cengiz hace 1 año
padre
commit
aae01f3dfc

+ 22 - 22
Trio/Sources/Modules/Home/View/Header/PumpView.swift

@@ -96,28 +96,28 @@ struct PumpView: View {
                 }
 
                 if let date = expiresAtDate {
-                HStack {
-                    Image(systemName: hourglassIcon)
-                        .font(.callout)
-                        .foregroundStyle(timerColor)
-
-                    let remainingTimeString = remainingTimeString(time: date.timeIntervalSince(timerDate))
-
-                    Text(remainingTimeString)
-                        .font(date.timeIntervalSince(timerDate) > 0 ? .callout : .subheadline)
-                        .fontWeight(.bold)
-                        .fontDesign(.rounded)
-                        .lineLimit(2)
-                        .multilineTextAlignment(.leading)
-                        .frame(
-                            // If the string is > 6 chars, i.e., exceeds "xd yh", limit width to 80 pts
-                            // This forces the "Replace pod" string to wrap to 2 lines.
-                            maxWidth: remainingTimeString.count > 6 ? 80 : .infinity,
-                            alignment: .leading
-                        )
-                }
-                // aligns the stopwatch icon exactly with the first pixel of the reservoir icon
-                .padding(.leading, date.timeIntervalSince(timerDate) > 0 ? 12 : 0)
+                    HStack {
+                        Image(systemName: hourglassIcon)
+                            .font(.callout)
+                            .foregroundStyle(timerColor)
+
+                        let remainingTimeString = remainingTimeString(time: date.timeIntervalSince(timerDate))
+
+                        Text(remainingTimeString)
+                            .font(date.timeIntervalSince(timerDate) > 0 ? .callout : .subheadline)
+                            .fontWeight(.bold)
+                            .fontDesign(.rounded)
+                            .lineLimit(2)
+                            .multilineTextAlignment(.leading)
+                            .frame(
+                                // If the string is > 6 chars, i.e., exceeds "xd yh", limit width to 80 pts
+                                // This forces the "Replace pod" string to wrap to 2 lines.
+                                maxWidth: remainingTimeString.count > 6 ? 80 : .infinity,
+                                alignment: .leading
+                            )
+                    }
+                    // aligns the stopwatch icon exactly with the first pixel of the reservoir icon
+                    .padding(.leading, date.timeIntervalSince(timerDate) > 0 ? 12 : 0)
                 }
             }
         }

+ 1 - 1
Trio/Sources/Modules/Home/View/HomeRootView.swift

@@ -177,7 +177,7 @@ extension Home {
                 )
             }
 
-            return rateString + " " + String(localized: " U/hr", comment: "Unit per hour with space") + manualBasalString
+            return rateString + String(localized: " U/hr", comment: "Unit per hour with space") + manualBasalString
         }
 
         var overrideString: String? {