You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
footer: !alertMuter.configuration.shouldMute ?Text(String(format:NSLocalizedString("Temporarily silence all sounds from %1$@, including sounds for Critical Alerts such as Urgent Low, Sensor Fail, Pump Expiration and others.\n\nWhile sounds are muted, alerts from %1$@ will still vibrate if haptics are enabled. Your insulin pump and CGM hardware may still sound.", comment:""), appName, appName)):nil
99
99
){
100
100
if !alertMuter.configuration.shouldMute {
101
-
Button(action:{ showMuteAlertOptions =true}){
102
-
HStack(spacing:12){
103
-
Spacer()
104
-
muteAlertIcon
105
-
Text(NSLocalizedString("Mute App Sounds", comment:"Label for button to mute app sounds"))
106
-
.fontWeight(.semibold)
107
-
Spacer()
108
-
}
109
-
.padding(.vertical,6)
110
-
}
111
-
.actionSheet(isPresented: $showMuteAlertOptions){
112
-
muteAlertOptionsActionSheet
113
-
}
101
+
muteAlertsButton
114
102
}else{
115
-
Button(action: alertMuter.unmuteAlerts){
116
-
HStack(spacing:12){
117
-
Spacer()
118
-
unmuteAlertIcon
119
-
Text(NSLocalizedString("Tap to Unmute App Sounds", comment:"Label for button to unmute all app sounds"))
120
-
.fontWeight(.semibold)
121
-
Spacer()
122
-
}
123
-
.padding(.vertical,6)
124
-
}
125
-
VStack(spacing:12){
126
-
HStack{
127
-
Text(NSLocalizedString("Muted until", comment:"Label for when mute alert will end"))
128
-
Spacer()
129
-
Text(alertMuter.formattedEndTime)
130
-
.foregroundColor(.secondary)
131
-
}
132
-
133
-
Text("All app sounds, including sounds for Critical Alerts such as Urgent Low, Sensor Fail, and Pump Expiration will NOT sound.", comment:"Warning label that all alerts will not sound")
134
-
.font(.footnote)
135
-
}
103
+
unmuteAlertsButton
104
+
.listRowSeparator(.visible, edges:.all)
105
+
muteAlertsSummary
106
+
}
107
+
}
108
+
}
109
+
110
+
privatevarmuteAlertsButton:someView{
111
+
Button(action:{ showMuteAlertOptions =true}){
112
+
HStack(spacing:12){
113
+
Spacer()
114
+
muteAlertIcon
115
+
Text(NSLocalizedString("Mute App Sounds", comment:"Label for button to mute app sounds"))
116
+
.fontWeight(.semibold)
117
+
Spacer()
118
+
}
119
+
.padding(.vertical,6)
120
+
}
121
+
.actionSheet(isPresented: $showMuteAlertOptions){
122
+
muteAlertOptionsActionSheet
123
+
}
124
+
}
125
+
126
+
privatevarunmuteAlertsButton:someView{
127
+
Button(action: alertMuter.unmuteAlerts){
128
+
HStack(spacing:12){
129
+
Spacer()
130
+
unmuteAlertIcon
131
+
Text(NSLocalizedString("Tap to Unmute App Sounds", comment:"Label for button to unmute all app sounds"))
132
+
.fontWeight(.semibold)
133
+
Spacer()
134
+
}
135
+
.padding(.vertical,6)
136
+
}
137
+
}
138
+
139
+
privatevarmuteAlertsSummary:someView{
140
+
VStack(spacing:12){
141
+
HStack{
142
+
Text(NSLocalizedString("Muted until", comment:"Label for when mute alert will end"))
143
+
Spacer()
144
+
Text(alertMuter.formattedEndTime)
145
+
.foregroundColor(.secondary)
136
146
}
147
+
148
+
Text("All app sounds, including sounds for Critical Alerts such as Urgent Low, Sensor Fail, and Pump Expiration will NOT sound.", comment:"Warning label that all alerts will not sound")
0 commit comments