diff --git a/core/interfaces/src/main/java/info/nightscout/interfaces/pump/actions/CustomAction.kt b/core/interfaces/src/main/java/info/nightscout/interfaces/pump/actions/CustomAction.kt index e3eb80b606..a789e3f026 100644 --- a/core/interfaces/src/main/java/info/nightscout/interfaces/pump/actions/CustomAction.kt +++ b/core/interfaces/src/main/java/info/nightscout/interfaces/pump/actions/CustomAction.kt @@ -1,9 +1,8 @@ package info.nightscout.interfaces.pump.actions -import info.nightscout.interfaces.R - -class CustomAction @JvmOverloads constructor(val name: Int, val customActionType: CustomActionType, val iconResourceId: Int = R.drawable.ic_actions_profileswitch, var isEnabled: Boolean = true) { - - constructor(nameResourceId: Int, actionType: CustomActionType, enabled: Boolean) : - this(nameResourceId, actionType, R.drawable.ic_actions_profileswitch, enabled) -} \ No newline at end of file +data class CustomAction( + val name: Int, + val customActionType: CustomActionType, + val iconResourceId: Int, + var isEnabled: Boolean = true +) \ No newline at end of file diff --git a/core/interfaces/src/main/res/drawable/ic_actions_profileswitch.xml b/core/ui/src/main/res/drawable/ic_actions_profileswitch.xml similarity index 100% rename from core/interfaces/src/main/res/drawable/ic_actions_profileswitch.xml rename to core/ui/src/main/res/drawable/ic_actions_profileswitch.xml diff --git a/implementation/src/main/java/info/nightscout/implementation/userEntry/UserEntryPresentationHelperImpl.kt b/implementation/src/main/java/info/nightscout/implementation/userEntry/UserEntryPresentationHelperImpl.kt index 288e9f7d82..c13a78e140 100644 --- a/implementation/src/main/java/info/nightscout/implementation/userEntry/UserEntryPresentationHelperImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/userEntry/UserEntryPresentationHelperImpl.kt @@ -49,7 +49,7 @@ class UserEntryPresentationHelperImpl @Inject constructor( Sources.QuickWizard -> R.drawable.ic_quick_wizard Sources.ExtendedBolusDialog -> R.drawable.ic_actions_start_extended_bolus Sources.TTDialog -> R.drawable.ic_temptarget_high - Sources.ProfileSwitchDialog -> info.nightscout.interfaces.R.drawable.ic_actions_profileswitch + Sources.ProfileSwitchDialog -> info.nightscout.core.ui.R.drawable.ic_actions_profileswitch Sources.LoopDialog -> R.drawable.ic_loop_closed Sources.TempBasalDialog -> R.drawable.ic_actions_start_temp_basal Sources.CalibrationDialog -> R.drawable.ic_calibration diff --git a/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitch.kt b/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitch.kt index a425eb971d..82fc7e4a97 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitch.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitch.kt @@ -32,7 +32,7 @@ class ActionProfileSwitch(injector: HasAndroidInjector) : Action(injector) { override fun friendlyName(): Int = R.string.profilename override fun shortDescription(): String = rh.gs(R.string.changengetoprofilename, inputProfileName.value) - @DrawableRes override fun icon(): Int = info.nightscout.interfaces.R.drawable.ic_actions_profileswitch + @DrawableRes override fun icon(): Int = info.nightscout.core.ui.R.drawable.ic_actions_profileswitch override fun doAction(callback: Callback) { val activeProfileName = profileFunction.getProfileName() diff --git a/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitchPercent.kt b/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitchPercent.kt index 0dc585d2ca..2e2de7f32f 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitchPercent.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitchPercent.kt @@ -35,7 +35,7 @@ class ActionProfileSwitchPercent(injector: HasAndroidInjector) : Action(injector if (duration.value == 0) rh.gs(R.string.startprofileforever, pct.value.toInt()) else rh.gs(info.nightscout.core.ui.R.string.startprofile, pct.value.toInt(), duration.value) - @DrawableRes override fun icon(): Int = info.nightscout.interfaces.R.drawable.ic_actions_profileswitch + @DrawableRes override fun icon(): Int = info.nightscout.core.ui.R.drawable.ic_actions_profileswitch init { precondition = TriggerProfilePercent(injector, 100.0, Comparator.Compare.IS_EQUAL) diff --git a/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionRunAutotune.kt b/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionRunAutotune.kt index c2dceab6dc..cd008a2e39 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionRunAutotune.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/actions/ActionRunAutotune.kt @@ -36,7 +36,7 @@ class ActionRunAutotune(injector: HasAndroidInjector) : Action(injector) { override fun friendlyName(): Int = info.nightscout.core.ui.R.string.autotune_run override fun shortDescription(): String = resourceHelper.gs(info.nightscout.core.ui.R.string.autotune_profile_name, inputProfileName.value) - @DrawableRes override fun icon(): Int = info.nightscout.interfaces.R.drawable.ic_actions_profileswitch + @DrawableRes override fun icon(): Int = info.nightscout.core.ui.R.drawable.ic_actions_profileswitch override fun doAction(callback: Callback) { val autoSwitch = sp.getBoolean(info.nightscout.core.utils.R.string.key_autotune_auto, false) diff --git a/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerProfilePercent.kt b/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerProfilePercent.kt index 09c9ef8f90..55b996f188 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerProfilePercent.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerProfilePercent.kt @@ -86,7 +86,7 @@ class TriggerProfilePercent(injector: HasAndroidInjector) : Trigger(injector) { override fun friendlyDescription(): String = rh.gs(R.string.percentagecompared, rh.gs(comparator.value.stringRes), pct.value.toInt()) - override fun icon(): Optional = Optional.of(info.nightscout.interfaces.R.drawable.ic_actions_profileswitch) + override fun icon(): Optional = Optional.of(info.nightscout.core.ui.R.drawable.ic_actions_profileswitch) override fun duplicate(): Trigger = TriggerProfilePercent(injector, this) diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt index a80c4540a8..38b08f12eb 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt @@ -1170,13 +1170,14 @@ class MedtronicPumpPlugin @Inject constructor( private var customActions: List? = null private val customActionWakeUpAndTune = CustomAction( R.string.medtronic_custom_action_wake_and_tune, - MedtronicCustomActionType.WakeUpAndTune + MedtronicCustomActionType.WakeUpAndTune, + info.nightscout.core.ui.R.drawable.ic_actions_profileswitch ) private val customActionClearBolusBlock = CustomAction( - R.string.medtronic_custom_action_clear_bolus_block, MedtronicCustomActionType.ClearBolusBlock, false + R.string.medtronic_custom_action_clear_bolus_block, MedtronicCustomActionType.ClearBolusBlock, info.nightscout.core.ui.R.drawable.ic_actions_profileswitch, false ) private val customActionResetRLConfig = CustomAction( - R.string.medtronic_custom_action_reset_rileylink, MedtronicCustomActionType.ResetRileyLinkConfiguration, true + R.string.medtronic_custom_action_reset_rileylink, MedtronicCustomActionType.ResetRileyLinkConfiguration, info.nightscout.core.ui.R.drawable.ic_actions_profileswitch, true ) override fun getCustomActions(): List? {