Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Fix not closed loop color and text for loop status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
dnzxy committed Nov 22, 2023
1 parent f15fb3f commit a92d981
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion FreeAPS/Sources/Modules/Home/View/Header/LoopView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct LoopView: View {
loopStatusBar("Manual")
} else if actualSuggestion?.timestamp != nil {
loopStatusBar(timeString)
} else if !closedLoop {
} else if closedLoop {
loopStatusBar("--")
} else {
loopStatusBar("--")
Expand Down Expand Up @@ -96,6 +96,10 @@ struct LoopView: View {
guard manualTempBasal == false else {
return .loopManualTemp
}
guard closedLoop == true else {
return .loopGray
}

let delta = timerDate.timeIntervalSince(lastLoopDate) - Config.lag

if delta <= 5.minutes.timeInterval {
Expand Down

0 comments on commit a92d981

Please sign in to comment.