Просмотр исходного кода

Remove dev-only test-alert buttons from Pump settings

The fireTestAlert / retractTestAlerts buttons and their state-model
backing methods existed as a scratch area for exercising the
foreground modal scheduler and background UN delivery paths during
the alert/notification refactor. They have no place in shipped UI.
trioneer недель назад: 2
Родитель
Сommit
22cb43f140

+ 0 - 29
Trio/Sources/Modules/PumpConfig/PumpConfigStateModel.swift

@@ -53,35 +53,6 @@ extension PumpConfig {
         func ack() {
             trioAlertManager.acknowledgeAllOutstanding()
         }
-
-        // FIXME: Remove before merge. Dev-only buttons for exercising the
-        // foreground modal scheduler + background UN delivery paths. The body
-        // text is intentionally technobabble — it's for developers verifying
-        // pipeline wiring, not end users.
-        func fireTestAlert(critical: Bool) {
-            let identifier = Alert.Identifier(
-                managerIdentifier: "Trio.test",
-                alertIdentifier: "test-\(UUID().uuidString.prefix(8))"
-            )
-            let content = Alert.Content(
-                title: critical ? "Critical test alert" : "Test alert",
-                body: "If you see this banner in-app, the foreground modal scheduler is wired. Background it before tapping to test the UN push path.",
-                acknowledgeActionButtonLabel: "OK"
-            )
-            let alert = Alert(
-                identifier: identifier,
-                foregroundContent: content,
-                backgroundContent: content,
-                trigger: .immediate,
-                interruptionLevel: critical ? .critical : .timeSensitive
-            )
-            trioAlertManager.issueAlert(alert)
-        }
-
-        func retractTestAlerts() {
-            let identifier = Alert.Identifier(managerIdentifier: "Trio.test", alertIdentifier: "test")
-            trioAlertManager.retractAlert(identifier: identifier)
-        }
     }
 }
 

+ 0 - 3
Trio/Sources/Modules/PumpConfig/View/PumpConfigRootView.swift

@@ -49,9 +49,6 @@ extension PumpConfig {
                                     Button("Acknowledge all alerts") { state.ack() }
                                 }
                                 Spacer()
-                                Button("Fire test alert (immediate)") { state.fireTestAlert(critical: false) }
-                                Button("Fire test alert (critical)") { state.fireTestAlert(critical: true) }
-                                Button("Retract test alerts") { state.retractTestAlerts() }
                             } else {
                                 VStack {
                                     Button {