浏览代码

Fix snooze alert long-press

dnzxy 1 周之前
父节点
当前提交
ef209230a4

+ 1 - 1
Trio/Sources/Modules/CGMSettings/View/CustomCGMOptionsView.swift

@@ -22,7 +22,7 @@ extension CGMSettings {
         @State private var period: Double = UserDefaults.standard.double(forKey: "GlucoseSimulator_Period")
         @State private var period: Double = UserDefaults.standard.double(forKey: "GlucoseSimulator_Period")
         @State private var noiseAmplitude: Double = UserDefaults.standard.double(forKey: "GlucoseSimulator_NoiseAmplitude")
         @State private var noiseAmplitude: Double = UserDefaults.standard.double(forKey: "GlucoseSimulator_NoiseAmplitude")
         @State private var produceStaleValues: Bool = UserDefaults.standard.bool(forKey: "GlucoseSimulator_ProduceStaleValues")
         @State private var produceStaleValues: Bool = UserDefaults.standard.bool(forKey: "GlucoseSimulator_ProduceStaleValues")
-      
+
         /// Drives the synthetic `cgmStatusHighlight`
         /// Drives the synthetic `cgmStatusHighlight`
         @State private var simulatedScenarioRaw: String = UserDefaults.standard
         @State private var simulatedScenarioRaw: String = UserDefaults.standard
             .string(forKey: "GlucoseSimulator.simulatedScenario") ?? SimulatedSensorScenario.runningNormally.rawValue
             .string(forKey: "GlucoseSimulator.simulatedScenario") ?? SimulatedSensorScenario.runningNormally.rawValue

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

@@ -150,7 +150,7 @@ extension Home {
             .onLongPressGesture {
             .onLongPressGesture {
                 let impactHeavy = UIImpactFeedbackGenerator(style: .heavy)
                 let impactHeavy = UIImpactFeedbackGenerator(style: .heavy)
                 impactHeavy.impactOccurred()
                 impactHeavy.impactOccurred()
-                state.showModal(for: .snooze)
+                showSnoozeSheet = true
             }
             }
         }
         }