Add a new Color Group for Basal
when Loop entries are shown in fragment, it better...
This commit is contained in:
parent
82299e430b
commit
41ffa873f1
2 changed files with 9 additions and 7 deletions
|
@ -22,13 +22,14 @@ class UserEntryPresentationHelper @Inject constructor(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
fun colorId(colorGroup: ColorGroup): Int = when (colorGroup) {
|
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.CarbTreatment -> R.color.carbs
|
||||||
ColorGroup.TT -> R.color.tempTargetConfirmation
|
ColorGroup.TT -> R.color.tempTargetConfirmation
|
||||||
ColorGroup.Profile -> R.color.white
|
ColorGroup.Profile -> R.color.white
|
||||||
ColorGroup.Loop -> R.color.loopClosed
|
ColorGroup.Loop -> R.color.loopClosed
|
||||||
ColorGroup.Careportal -> R.color.high
|
ColorGroup.Careportal -> R.color.high
|
||||||
ColorGroup.Pump -> R.color.iob
|
ColorGroup.Pump -> R.color.loopDisconnected
|
||||||
ColorGroup.Aaps -> R.color.defaulttext
|
ColorGroup.Aaps -> R.color.defaulttext
|
||||||
else -> R.color.defaulttext
|
else -> R.color.defaulttext
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ data class UserEntry(
|
||||||
SUPERBOLUS_TBR (ColorGroup.InsulinTreatment),
|
SUPERBOLUS_TBR (ColorGroup.InsulinTreatment),
|
||||||
CARBS (ColorGroup.CarbTreatment),
|
CARBS (ColorGroup.CarbTreatment),
|
||||||
EXTENDED_CARBS (ColorGroup.CarbTreatment),
|
EXTENDED_CARBS (ColorGroup.CarbTreatment),
|
||||||
TEMP_BASAL (ColorGroup.InsulinTreatment),
|
TEMP_BASAL (ColorGroup.BasalTreatment),
|
||||||
TT (ColorGroup.TT),
|
TT (ColorGroup.TT),
|
||||||
NEW_PROFILE (ColorGroup.Profile),
|
NEW_PROFILE (ColorGroup.Profile),
|
||||||
CLONE_PROFILE (ColorGroup.Profile),
|
CLONE_PROFILE (ColorGroup.Profile),
|
||||||
|
@ -44,8 +44,8 @@ data class UserEntry(
|
||||||
SUSPEND (ColorGroup.Loop),
|
SUSPEND (ColorGroup.Loop),
|
||||||
HW_PUMP_ALLOWED (ColorGroup.Pump),
|
HW_PUMP_ALLOWED (ColorGroup.Pump),
|
||||||
CLEAR_PAIRING_KEYS (ColorGroup.Pump),
|
CLEAR_PAIRING_KEYS (ColorGroup.Pump),
|
||||||
ACCEPTS_TEMP_BASAL (ColorGroup.InsulinTreatment),
|
ACCEPTS_TEMP_BASAL (ColorGroup.BasalTreatment),
|
||||||
CANCEL_TEMP_BASAL (ColorGroup.InsulinTreatment),
|
CANCEL_TEMP_BASAL (ColorGroup.BasalTreatment),
|
||||||
CANCEL_EXTENDED_BOLUS (ColorGroup.InsulinTreatment),
|
CANCEL_EXTENDED_BOLUS (ColorGroup.InsulinTreatment),
|
||||||
CANCEL_TT (ColorGroup.TT),
|
CANCEL_TT (ColorGroup.TT),
|
||||||
CAREPORTAL (ColorGroup.Careportal),
|
CAREPORTAL (ColorGroup.Careportal),
|
||||||
|
@ -60,7 +60,7 @@ data class UserEntry(
|
||||||
BG_REMOVED (ColorGroup.Careportal),
|
BG_REMOVED (ColorGroup.Careportal),
|
||||||
CAREPORTAL_REMOVED (ColorGroup.Careportal),
|
CAREPORTAL_REMOVED (ColorGroup.Careportal),
|
||||||
EXTENDED_BOLUS_REMOVED (ColorGroup.InsulinTreatment),
|
EXTENDED_BOLUS_REMOVED (ColorGroup.InsulinTreatment),
|
||||||
FOOD_REMOVED (ColorGroup.Careportal),
|
FOOD_REMOVED (ColorGroup.CarbTreatment),
|
||||||
PROFILE_REMOVED (ColorGroup.Profile),
|
PROFILE_REMOVED (ColorGroup.Profile),
|
||||||
PROFILE_SWITCH_REMOVED (ColorGroup.Profile),
|
PROFILE_SWITCH_REMOVED (ColorGroup.Profile),
|
||||||
RESTART_EVENTS_REMOVED (ColorGroup.Aaps),
|
RESTART_EVENTS_REMOVED (ColorGroup.Aaps),
|
||||||
|
@ -87,7 +87,7 @@ data class UserEntry(
|
||||||
OTP_EXPORT (ColorGroup.Aaps),
|
OTP_EXPORT (ColorGroup.Aaps),
|
||||||
OTP_RESET (ColorGroup.Aaps),
|
OTP_RESET (ColorGroup.Aaps),
|
||||||
STOP_SMS (ColorGroup.Aaps),
|
STOP_SMS (ColorGroup.Aaps),
|
||||||
FOOD (ColorGroup.Careportal),
|
FOOD (ColorGroup.CarbTreatment),
|
||||||
EXPORT_CSV (ColorGroup.Aaps),
|
EXPORT_CSV (ColorGroup.Aaps),
|
||||||
UNKNOWN (ColorGroup.Aaps)
|
UNKNOWN (ColorGroup.Aaps)
|
||||||
;
|
;
|
||||||
|
@ -144,6 +144,7 @@ data class UserEntry(
|
||||||
|
|
||||||
enum class ColorGroup() {
|
enum class ColorGroup() {
|
||||||
InsulinTreatment,
|
InsulinTreatment,
|
||||||
|
BasalTreatment,
|
||||||
CarbTreatment,
|
CarbTreatment,
|
||||||
TT,
|
TT,
|
||||||
Profile,
|
Profile,
|
||||||
|
|
Loading…
Reference in a new issue