Kaynağa Gözat

Surface override-Focus fact independently of sound on/off in alarm row

The row used to drop the override-Focus badge whenever sound was
off — but "sound off + override on" is a valid combo (silent banner
+ haptic that pierces Focus / Sleep). Render the sound state and the
override badge as separate inline tags so both facts are always
visible.
trioneer 2 hafta önce
ebeveyn
işleme
0832e4623f

+ 16 - 12
Trio/Sources/Modules/GlucoseAlerts/View/GlucoseAlertsRootView.swift

@@ -287,18 +287,22 @@ extension GlucoseAlerts {
         }
 
         private func soundSummary(for alarm: GlucoseAlert) -> some View {
-            var icon = "speaker.fill"
-            var label = String(localized: "Sound on")
-            if !alarm.playsSound {
-                icon = "speaker.slash.fill"
-                label = String(localized: "Sound off")
-            } else if alarm.overridesSilenceAndDND {
-                icon = "speaker.wave.3.fill"
-                label = String(localized: "Override Silence & Focus")
-            }
-            return HStack(spacing: 4) {
-                Image(systemName: icon)
-                Text(label)
+            // Show the sound and override facts independently. Previously
+            // the override badge was hidden when sound was off, but "sound
+            // off + override on" is a valid combo (silent + haptic that
+            // breaks through Focus / Sleep) and the user needs to see it.
+            HStack(spacing: 6) {
+                HStack(spacing: 4) {
+                    Image(systemName: alarm.playsSound ? "speaker.wave.2.fill" : "speaker.slash.fill")
+                    Text(alarm.playsSound ? "Sound on" : "Sound off")
+                }
+                if alarm.overridesSilenceAndDND {
+                    Text("·")
+                    HStack(spacing: 4) {
+                        Image(systemName: "bell.badge.fill")
+                        Text("Overrides Focus")
+                    }
+                }
             }
             .font(.footnote)
             .foregroundColor(.secondary)