|
@@ -12,8 +12,6 @@ extension ShortcutsConfig {
|
|
|
@Published var maxBolusByShortcuts: BolusShortcutLimit = .notAllowed
|
|
@Published var maxBolusByShortcuts: BolusShortcutLimit = .notAllowed
|
|
|
|
|
|
|
|
override func subscribe() {
|
|
override func subscribe() {
|
|
|
- // allowBolusByShortcuts = (maxBolusByShortcuts != .notAllowed)
|
|
|
|
|
-
|
|
|
|
|
subscribeSetting(\.bolusShortcut, on: $maxBolusByShortcuts) {
|
|
subscribeSetting(\.bolusShortcut, on: $maxBolusByShortcuts) {
|
|
|
maxBolusByShortcuts = ($0 == .notAllowed) ? .limitBolusMax : $0
|
|
maxBolusByShortcuts = ($0 == .notAllowed) ? .limitBolusMax : $0
|
|
|
allowBolusByShortcuts = ($0 != .notAllowed)
|
|
allowBolusByShortcuts = ($0 != .notAllowed)
|
|
@@ -25,7 +23,6 @@ extension ShortcutsConfig {
|
|
|
// the bolus is not allowed
|
|
// the bolus is not allowed
|
|
|
self?.settingsManager.settings.bolusShortcut = .notAllowed
|
|
self?.settingsManager.settings.bolusShortcut = .notAllowed
|
|
|
} else {
|
|
} else {
|
|
|
- //
|
|
|
|
|
if let bs = self?.maxBolusByShortcuts {
|
|
if let bs = self?.maxBolusByShortcuts {
|
|
|
self?.settingsManager.settings.bolusShortcut = bs
|
|
self?.settingsManager.settings.bolusShortcut = bs
|
|
|
} else {
|
|
} else {
|