Skip to content

Commit

Permalink
Allow bolus when long time since last loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-b-m committed Jun 22, 2024
1 parent f7c7fe4 commit c0178e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FreeAPS/Sources/Modules/Bolus/BolusStateModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,13 @@ extension Bolus {
func notActive() {
let defaults = UserDefaults.standard
defaults.set(false, forKey: IAPSconfig.inBolusView)
//print("Active: NO") // For testing
// print("Active: NO") // For testing
}

func viewActive() {
let defaults = UserDefaults.standard
defaults.set(true, forKey: IAPSconfig.inBolusView)
//print("Active: YES") // For testing
// print("Active: YES") // For testing
}

private func prepareData() {
Expand Down Expand Up @@ -359,7 +359,7 @@ extension Bolus.StateModel: SuggestionObserver {
setupInsulinRequired()
loopDate = apsManager.lastLoopDate

if abs(loopDate.timeIntervalSinceNow / 60) > loopReminder * 1.5 {
if abs(loopDate.timeIntervalSinceNow / 60) > loopReminder * 1.5, abs(now.timeIntervalSinceNow / 60) > loopReminder {
hideModal()
notActive()
debug(.apsManager, "Force Closing Bolus View", printToConsole: true)
Expand Down

0 comments on commit c0178e1

Please sign in to comment.