From 41ffa873f1b74323bcc0ac7114a8c1c93e80acdd Mon Sep 17 00:00:00 2001 From: Philoul Date: Sat, 3 Apr 2021 18:13:33 +0200 Subject: [PATCH] Add a new Color Group for Basal when Loop entries are shown in fragment, it better... --- .../androidaps/utils/UserEntryPresentationHelper.kt | 5 +++-- .../androidaps/database/entities/UserEntry.kt | 11 ++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/info/nightscout/androidaps/utils/UserEntryPresentationHelper.kt b/core/src/main/java/info/nightscout/androidaps/utils/UserEntryPresentationHelper.kt index 9c08465858..45e7e19106 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/UserEntryPresentationHelper.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/UserEntryPresentationHelper.kt @@ -22,13 +22,14 @@ class UserEntryPresentationHelper @Inject constructor( ) { fun colorId(colorGroup: ColorGroup): Int = when (colorGroup) { - ColorGroup.InsulinTreatment -> R.color.basal + ColorGroup.InsulinTreatment -> R.color.iob + ColorGroup.BasalTreatment -> R.color.basal ColorGroup.CarbTreatment -> R.color.carbs ColorGroup.TT -> R.color.tempTargetConfirmation ColorGroup.Profile -> R.color.white ColorGroup.Loop -> R.color.loopClosed ColorGroup.Careportal -> R.color.high - ColorGroup.Pump -> R.color.iob + ColorGroup.Pump -> R.color.loopDisconnected ColorGroup.Aaps -> R.color.defaulttext else -> R.color.defaulttext } diff --git a/database/src/main/java/info/nightscout/androidaps/database/entities/UserEntry.kt b/database/src/main/java/info/nightscout/androidaps/database/entities/UserEntry.kt index ed7e2a5d33..d097001f8e 100644 --- a/database/src/main/java/info/nightscout/androidaps/database/entities/UserEntry.kt +++ b/database/src/main/java/info/nightscout/androidaps/database/entities/UserEntry.kt @@ -26,7 +26,7 @@ data class UserEntry( SUPERBOLUS_TBR (ColorGroup.InsulinTreatment), CARBS (ColorGroup.CarbTreatment), EXTENDED_CARBS (ColorGroup.CarbTreatment), - TEMP_BASAL (ColorGroup.InsulinTreatment), + TEMP_BASAL (ColorGroup.BasalTreatment), TT (ColorGroup.TT), NEW_PROFILE (ColorGroup.Profile), CLONE_PROFILE (ColorGroup.Profile), @@ -44,8 +44,8 @@ data class UserEntry( SUSPEND (ColorGroup.Loop), HW_PUMP_ALLOWED (ColorGroup.Pump), CLEAR_PAIRING_KEYS (ColorGroup.Pump), - ACCEPTS_TEMP_BASAL (ColorGroup.InsulinTreatment), - CANCEL_TEMP_BASAL (ColorGroup.InsulinTreatment), + ACCEPTS_TEMP_BASAL (ColorGroup.BasalTreatment), + CANCEL_TEMP_BASAL (ColorGroup.BasalTreatment), CANCEL_EXTENDED_BOLUS (ColorGroup.InsulinTreatment), CANCEL_TT (ColorGroup.TT), CAREPORTAL (ColorGroup.Careportal), @@ -60,7 +60,7 @@ data class UserEntry( BG_REMOVED (ColorGroup.Careportal), CAREPORTAL_REMOVED (ColorGroup.Careportal), EXTENDED_BOLUS_REMOVED (ColorGroup.InsulinTreatment), - FOOD_REMOVED (ColorGroup.Careportal), + FOOD_REMOVED (ColorGroup.CarbTreatment), PROFILE_REMOVED (ColorGroup.Profile), PROFILE_SWITCH_REMOVED (ColorGroup.Profile), RESTART_EVENTS_REMOVED (ColorGroup.Aaps), @@ -87,7 +87,7 @@ data class UserEntry( OTP_EXPORT (ColorGroup.Aaps), OTP_RESET (ColorGroup.Aaps), STOP_SMS (ColorGroup.Aaps), - FOOD (ColorGroup.Careportal), + FOOD (ColorGroup.CarbTreatment), EXPORT_CSV (ColorGroup.Aaps), UNKNOWN (ColorGroup.Aaps) ; @@ -144,6 +144,7 @@ data class UserEntry( enum class ColorGroup() { InsulinTreatment, + BasalTreatment, CarbTreatment, TT, Profile,