|
@@ -64,11 +64,20 @@ import WatchConnectivity
|
|
|
var mealBolusStep: MealBolusStep = .savingCarbs
|
|
var mealBolusStep: MealBolusStep = .savingCarbs
|
|
|
var isMealBolusCombo: Bool = false
|
|
var isMealBolusCombo: Bool = false
|
|
|
|
|
|
|
|
|
|
+ private var _showBolusProgressOverlay: Bool = false
|
|
|
var showBolusProgressOverlay: Bool {
|
|
var showBolusProgressOverlay: Bool {
|
|
|
- (!showAcknowledgmentBanner || !showCommsAnimation || !showCommsAnimation) && bolusProgress > 0 && bolusProgress < 1.0 &&
|
|
|
|
|
- !isBolusCanceled
|
|
|
|
|
|
|
+ get {
|
|
|
|
|
+ return (!showAcknowledgmentBanner || !showCommsAnimation || !showCommsAnimation) &&
|
|
|
|
|
+ bolusProgress > 0 && bolusProgress < 1.0 &&
|
|
|
|
|
+ !isBolusCanceled
|
|
|
|
|
+ }
|
|
|
|
|
+ set {
|
|
|
|
|
+ _showBolusProgressOverlay = newValue
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
var recommendedBolus: Decimal = 0
|
|
var recommendedBolus: Decimal = 0
|
|
|
|
|
|
|
|
// Debouncing and batch processing helpers
|
|
// Debouncing and batch processing helpers
|
|
@@ -141,7 +150,9 @@ import WatchConnectivity
|
|
|
|
|
|
|
|
if activationState == .activated {
|
|
if activationState == .activated {
|
|
|
self.forceConditionalWatchStateUpdate()
|
|
self.forceConditionalWatchStateUpdate()
|
|
|
-
|
|
|
|
|
|
|
+ // reset bolus progress visibility
|
|
|
|
|
+ self.showBolusProgressOverlay = false
|
|
|
|
|
+
|
|
|
print("⌚️ Watch session activated with state: \(activationState.rawValue)")
|
|
print("⌚️ Watch session activated with state: \(activationState.rawValue)")
|
|
|
|
|
|
|
|
self.isReachable = session.isReachable
|
|
self.isReachable = session.isReachable
|
|
@@ -325,10 +336,14 @@ import WatchConnectivity
|
|
|
|
|
|
|
|
if session.isReachable {
|
|
if session.isReachable {
|
|
|
self.forceConditionalWatchStateUpdate()
|
|
self.forceConditionalWatchStateUpdate()
|
|
|
|
|
+
|
|
|
|
|
+ // reset bolus progress visibility
|
|
|
|
|
+ self.showBolusProgressOverlay = false
|
|
|
|
|
|
|
|
// reset input amounts
|
|
// reset input amounts
|
|
|
self.bolusAmount = 0
|
|
self.bolusAmount = 0
|
|
|
self.carbsAmount = 0
|
|
self.carbsAmount = 0
|
|
|
|
|
+
|
|
|
// reset auth progress
|
|
// reset auth progress
|
|
|
self.confirmationProgress = 0
|
|
self.confirmationProgress = 0
|
|
|
}
|
|
}
|