Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fmegen/3.3.0.0 - Adding VeryHigh Overview Display Option #3678

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nd
fmegen committed Dec 31, 2024
commit c803d1c792a6d9f01ec0eb20ba5e2334c0b9bddf
1 change: 1 addition & 0 deletions app/src/main/kotlin/app/aaps/MainApp.kt
Original file line number Diff line number Diff line change
@@ -197,6 +197,7 @@ class MainApp : DaggerApplication() {
if (preferences.get(IntKey.OverviewEatingSoonDuration) == 0) preferences.remove(IntKey.OverviewEatingSoonDuration)
if (preferences.get(UnitDoubleKey.OverviewEatingSoonTarget) == 0.0) preferences.remove(UnitDoubleKey.OverviewEatingSoonTarget)
if (preferences.get(IntKey.OverviewActivityDuration) == 0) preferences.remove(IntKey.OverviewActivityDuration)
if (preferences.get(UnitDoubleKey.OverviewVeryHighMark) == 0.0) preferences.remove(UnitDoubleKey.OverviewVeryHighMark)
if (preferences.get(UnitDoubleKey.OverviewActivityTarget) == 0.0) preferences.remove(UnitDoubleKey.OverviewActivityTarget)
if (preferences.get(IntKey.OverviewHypoDuration) == 0) preferences.remove(IntKey.OverviewHypoDuration)
if (preferences.get(UnitDoubleKey.OverviewHypoTarget) == 0.0) preferences.remove(UnitDoubleKey.OverviewHypoTarget)
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ class InMemoryGlucoseValueDataPoint(
val veryHighLine = preferences.get(UnitDoubleKey.OverviewVeryHighMark)
val color = when {
valueToUnits(units) < lowLine -> rh.gac(context, app.aaps.core.ui.R.attr.bgLow)
veryHighLine > 0 && valueToUnits(units) > veryHighLine -> rh.gac(context, app.aaps.core.ui.R.attr.veryHighColor)
valueToUnits(units) > veryHighLine -> rh.gac(context, app.aaps.core.ui.R.attr.veryHighColor)
valueToUnits(units) > highLine -> rh.gac(context, app.aaps.core.ui.R.attr.highColor)
else -> rh.gac(context, app.aaps.core.ui.R.attr.bgInRange)
}