fix ios quick setup suppression toggle

This commit is contained in:
joshavant
2026-06-05 04:12:55 -05:00
parent 762540aa04
commit 0ee7cf970c

View File

@@ -95,7 +95,7 @@ struct GatewayQuickSetupSheet: View {
.buttonStyle(.bordered)
.disabled(self.connecting)
Toggle("Dont show this again", isOn: self.$quickSetupDismissed)
self.fullRowToggle("Dont show this again", isOn: self.$quickSetupDismissed)
.padding(.top, 4)
} else {
Text("No gateways found yet. Make sure your gateway is running and Bonjour discovery is enabled.")
@@ -135,6 +135,23 @@ struct GatewayQuickSetupSheet: View {
self.gatewayController.gateways.first
}
private func fullRowToggle(_ title: String, isOn: Binding<Bool>) -> some View {
Toggle(title, isOn: isOn)
.contentShape(Rectangle())
.overlay {
// Keep Toggle semantics for accessibility while making the full visual row tappable.
Button {
isOn.wrappedValue.toggle()
} label: {
Rectangle()
.fill(.clear)
.contentShape(Rectangle())
}
.buttonStyle(.plain)
.accessibilityHidden(true)
}
}
private func gatewayProblemPrimaryActionTitle(_ problem: GatewayConnectionProblem) -> String {
problem.canTrustRotatedCertificate ? "Trust certificate" : "Connect"
}