diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionCarePortalEvent.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionCarePortalEvent.kt index 617d56c121..29bda8f6fc 100644 --- a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionCarePortalEvent.kt +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionCarePortalEvent.kt @@ -49,7 +49,7 @@ class ActionCarePortalEvent(injector: HasAndroidInjector) : Action(injector) { } override fun friendlyName(): Int = R.string.careportal - override fun shortDescription(): String = resourceHelper.gs(cpEvent.value.stringRes, note.value) + override fun shortDescription(): String = resourceHelper.gs(cpEvent.value.stringResWithValue, note.value) @DrawableRes override fun icon(): Int = cpEvent.value.drawableRes diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/elements/InputCarePortalMenu.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/elements/InputCarePortalMenu.kt index 42b3437f34..19b1701c60 100644 --- a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/elements/InputCarePortalMenu.kt +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/elements/InputCarePortalMenu.kt @@ -22,7 +22,7 @@ class InputCarePortalMenu(private val resourceHelper: ResourceHelper) : Element( QUESTION (TherapyEvent.Type.QUESTION), ANNOUNCEMENT (TherapyEvent.Type.ANNOUNCEMENT); - @get:StringRes val stringRes: Int + @get:StringRes val stringResWithValue: Int get() = when (this) { NOTE -> R.string.careportal_note_message EXERCISE -> R.string.careportal_exercise_message @@ -30,6 +30,13 @@ class InputCarePortalMenu(private val resourceHelper: ResourceHelper) : Element( ANNOUNCEMENT -> R.string.careportal_announcement_message } + @get:StringRes val stringRes: Int + get() = when (this) { + NOTE -> R.string.careportal_note + EXERCISE -> R.string.careportal_exercise + QUESTION -> R.string.careportal_question + ANNOUNCEMENT -> R.string.careportal_announcement + } @get:DrawableRes val drawableRes: Int get() = when (this) { NOTE -> R.drawable.ic_cp_note