diff --git a/FreeAPS/Sources/Modules/NotificationsConfig/NotificationsConfigStateModel.swift b/FreeAPS/Sources/Modules/NotificationsConfig/NotificationsConfigStateModel.swift index 121aa748e..42c965fb6 100644 --- a/FreeAPS/Sources/Modules/NotificationsConfig/NotificationsConfigStateModel.swift +++ b/FreeAPS/Sources/Modules/NotificationsConfig/NotificationsConfigStateModel.swift @@ -10,7 +10,6 @@ extension NotificationsConfig { @Published var highGlucose: Decimal = 0 @Published var carbsRequiredThreshold: Decimal = 0 @Published var useLiveActivity = false - @Published var lockScreenView: LockScreenView = .simple var units: GlucoseUnits = .mmolL override func subscribe() { @@ -23,7 +22,7 @@ extension NotificationsConfig { subscribeSetting(\.addSourceInfoToGlucoseNotifications, on: $addSourceInfoToGlucoseNotifications) { addSourceInfoToGlucoseNotifications = $0 } subscribeSetting(\.useLiveActivity, on: $useLiveActivity) { useLiveActivity = $0 } - subscribeSetting(\.lockScreenView, on: $lockScreenView) { lockScreenView = $0 } + subscribeSetting(\.lowGlucose, on: $lowGlucose, initial: { let value = max(min($0, 400), 40) lowGlucose = units == .mmolL ? value.asMmolL : value diff --git a/FreeAPS/Sources/Modules/StatConfig/StatConfigStateModel.swift b/FreeAPS/Sources/Modules/StatConfig/StatConfigStateModel.swift index 4699f1a75..4e00fd2f5 100644 --- a/FreeAPS/Sources/Modules/StatConfig/StatConfigStateModel.swift +++ b/FreeAPS/Sources/Modules/StatConfig/StatConfigStateModel.swift @@ -10,6 +10,7 @@ extension StatConfig { @Published var yGridLines: Bool = false @Published var oneDimensionalGraph = false @Published var rulerMarks: Bool = false + @Published var lockScreenView: LockScreenView = .simple var units: GlucoseUnits = .mmolL @@ -22,6 +23,7 @@ extension StatConfig { subscribeSetting(\.yGridLines, on: $yGridLines) { yGridLines = $0 } subscribeSetting(\.rulerMarks, on: $rulerMarks) { rulerMarks = $0 } subscribeSetting(\.oneDimensionalGraph, on: $oneDimensionalGraph) { oneDimensionalGraph = $0 } + subscribeSetting(\.lockScreenView, on: $lockScreenView) { lockScreenView = $0 } subscribeSetting(\.low, on: $low, initial: { let value = max(min($0, 90), 40)