From 247768c139f78d03cb12af0e6a2bee7a574eccc5 Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Tue, 9 Nov 2021 23:26:44 +0100 Subject: [PATCH] ktlintFormat --- .../omnipod/dash/OmnipodDashPumpPlugin.kt | 12 ++--- .../omnipod/dash/ui/DashPodHistoryActivity.kt | 50 +++++++++---------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index e3f7d0693b..85b9606b37 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -461,16 +461,16 @@ class OmnipodDashPumpPlugin @Inject constructor( R.string.key_omnipod_common_expiration_reminder_enabled ) || it.isChanged( - rh, - R.string.key_omnipod_common_expiration_reminder_hours_before_shutdown + rh, + R.string.key_omnipod_common_expiration_reminder_hours_before_shutdown ) || it.isChanged( - rh, - R.string.key_omnipod_common_low_reservoir_alert_enabled + rh, + R.string.key_omnipod_common_low_reservoir_alert_enabled ) || it.isChanged( - rh, - R.string.key_omnipod_common_low_reservoir_alert_units + rh, + R.string.key_omnipod_common_low_reservoir_alert_units ) ) { commandQueue.customCommand(CommandUpdateAlertConfiguration(), null) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt index 18b0277238..ff04fa5b91 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt @@ -56,44 +56,44 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() { private fun groupForCommandType(type: OmnipodCommandType): PumpHistoryEntryGroup { return when (type) { - OmnipodCommandType.INITIALIZE_POD -> + OmnipodCommandType.INITIALIZE_POD -> PumpHistoryEntryGroup.Prime - OmnipodCommandType.INSERT_CANNULA -> + OmnipodCommandType.INSERT_CANNULA -> PumpHistoryEntryGroup.Prime - OmnipodCommandType.DEACTIVATE_POD -> + OmnipodCommandType.DEACTIVATE_POD -> PumpHistoryEntryGroup.Prime - OmnipodCommandType.DISCARD_POD -> + OmnipodCommandType.DISCARD_POD -> PumpHistoryEntryGroup.Prime OmnipodCommandType.CANCEL_TEMPORARY_BASAL -> PumpHistoryEntryGroup.Basal - OmnipodCommandType.SET_BASAL_PROFILE -> + OmnipodCommandType.SET_BASAL_PROFILE -> PumpHistoryEntryGroup.Basal - OmnipodCommandType.SET_TEMPORARY_BASAL -> + OmnipodCommandType.SET_TEMPORARY_BASAL -> PumpHistoryEntryGroup.Basal - OmnipodCommandType.RESUME_DELIVERY -> + OmnipodCommandType.RESUME_DELIVERY -> PumpHistoryEntryGroup.Basal - OmnipodCommandType.SUSPEND_DELIVERY -> + OmnipodCommandType.SUSPEND_DELIVERY -> PumpHistoryEntryGroup.Basal - OmnipodCommandType.SET_BOLUS -> + OmnipodCommandType.SET_BOLUS -> PumpHistoryEntryGroup.Bolus - OmnipodCommandType.CANCEL_BOLUS -> + OmnipodCommandType.CANCEL_BOLUS -> PumpHistoryEntryGroup.Bolus - OmnipodCommandType.ACKNOWLEDGE_ALERTS -> + OmnipodCommandType.ACKNOWLEDGE_ALERTS -> PumpHistoryEntryGroup.Alarm - OmnipodCommandType.CONFIGURE_ALERTS -> + OmnipodCommandType.CONFIGURE_ALERTS -> PumpHistoryEntryGroup.Alarm - OmnipodCommandType.PLAY_TEST_BEEP -> + OmnipodCommandType.PLAY_TEST_BEEP -> PumpHistoryEntryGroup.Alarm - OmnipodCommandType.GET_POD_STATUS -> + OmnipodCommandType.GET_POD_STATUS -> PumpHistoryEntryGroup.Configuration - OmnipodCommandType.SET_TIME -> + OmnipodCommandType.SET_TIME -> PumpHistoryEntryGroup.Configuration - OmnipodCommandType.READ_POD_PULSE_LOG -> + OmnipodCommandType.READ_POD_PULSE_LOG -> PumpHistoryEntryGroup.Unknown } } @@ -225,13 +225,13 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() { OmnipodCommandType.DISCARD_POD, OmnipodCommandType.SUSPEND_DELIVERY, OmnipodCommandType.RESUME_DELIVERY, - OmnipodCommandType.SET_BASAL_PROFILE -> { + OmnipodCommandType.SET_BASAL_PROFILE -> { android.graphics.Color.CYAN } // User action OmnipodCommandType.PLAY_TEST_BEEP, OmnipodCommandType.ACKNOWLEDGE_ALERTS, - OmnipodCommandType.CANCEL_BOLUS -> { + OmnipodCommandType.CANCEL_BOLUS -> { android.graphics.Color.GREEN } // Insulin treatment @@ -240,7 +240,7 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() { android.graphics.Color.WHITE } - else -> + else -> // Other android.graphics.Color.LTGRAY } @@ -268,7 +268,7 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() { } } - OmnipodCommandType.SET_BOLUS -> { + OmnipodCommandType.SET_BOLUS -> { val bolus = historyEntry.record as BolusRecord bolus.let { rh.gs(R.string.omnipod_common_history_bolus_value, it.amout) @@ -278,12 +278,12 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() { OmnipodCommandType.SET_BASAL_PROFILE, OmnipodCommandType.SET_TIME, OmnipodCommandType.INSERT_CANNULA, - OmnipodCommandType.RESUME_DELIVERY -> { + OmnipodCommandType.RESUME_DELIVERY -> { val basal = historyEntry.record as BasalValuesRecord ProfileUtil.getBasalProfilesDisplayable(basal.segments.toTypedArray(), PumpType.OMNIPOD_DASH) } - else -> + else -> "" } // Set some color @@ -306,12 +306,12 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() { return when { historyEntry.initialResult == InitialResult.FAILURE_SENDING -> R.string.omnipod_dash_failed_to_send - historyEntry.initialResult == InitialResult.NOT_SENT -> + historyEntry.initialResult == InitialResult.NOT_SENT -> R.string.omnipod_dash_command_not_sent historyEntry.initialResult == InitialResult.SENT && - historyEntry.resolvedResult == ResolvedResult.FAILURE -> + historyEntry.resolvedResult == ResolvedResult.FAILURE -> R.string.omnipod_dash_command_not_received_by_the_pod - else -> + else -> R.string.omnipod_dash_unknown } }