From 29da89e7d633852343660bd51e4fbbb420e42c50 Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Wed, 24 Nov 2021 21:46:34 +0100 Subject: [PATCH] format --- .../plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt | 3 +-- .../plugins/pump/omnipod/dash/driver/OmnipodDashManager.kt | 2 +- .../pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt | 1 - .../dash/driver/pod/command/SuspendDeliveryCommand.kt | 3 +-- .../pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt | 4 ---- omnipod-dash/src/main/res/xml/omnipod_dash_preferences.xml | 7 +------ 6 files changed, 4 insertions(+), 16 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 0edbc7b19f..d8c998c90a 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 @@ -1116,7 +1116,6 @@ class OmnipodDashPumpPlugin @Inject constructor( } } - private fun silenceAlerts(): PumpEnactResult { // TODO filter alert types return podStateManager.activeAlerts?.let { @@ -1141,7 +1140,7 @@ class OmnipodDashPumpPlugin @Inject constructor( BeepRepetitionType.EVERY_MINUTE_AND_EVERY_15_MIN ), ) - val ret = executeProgrammingCommand( + val ret = executeProgrammingCommand( historyEntry = history.createRecord(OmnipodCommandType.CONFIGURE_ALERTS), command = omnipodManager.programAlerts(alerts).ignoreElements(), ).toPumpEnactResult() diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManager.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManager.kt index d20c790159..4f3f682892 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManager.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManager.kt @@ -22,7 +22,7 @@ interface OmnipodDashManager { fun setBasalProgram(basalProgram: BasalProgram, hasBasalBeepEnabled: Boolean): Observable fun suspendDelivery(hasBasalBeepEnabled: Boolean): Observable - + fun setTempBasal(rate: Double, durationInMinutes: Short, tempBasalBeeps: Boolean): Observable fun stopTempBasal(hasTempBasalBeepEnabled: Boolean): Observable diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt index 288153834c..8f39b622d7 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt @@ -498,7 +498,6 @@ class OmnipodDashManagerImpl @Inject constructor( } } - override fun suspendDelivery(hasBasalBeepEnabled: Boolean): Observable { return Observable.concat( observePodRunning, diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/SuspendDeliveryCommand.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/SuspendDeliveryCommand.kt index c434125335..23409a812e 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/SuspendDeliveryCommand.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/SuspendDeliveryCommand.kt @@ -110,5 +110,4 @@ class SuspendDeliveryCommand private constructor( private const val LENGTH: Short = 7 private const val BODY_LENGTH: Byte = 5 } - -} \ No newline at end of file +} diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt index 0e917c3147..60a6f928a7 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt @@ -650,10 +650,6 @@ class OmnipodDashOverviewFragment : DaggerFragment() { return sp.getBoolean(R.string.omnipod_common_preferences_automatically_silence_alerts, false) } - private fun isSuspendDeliveryButtonEnabled(): Boolean { - return sp.getBoolean(R.string.key_omnipod_common_suspend_delivery_button_enabled, false) - } - private fun displayErrorDialog(title: String, message: String, withSound: Boolean) { context?.let { ErrorHelperActivity.runAlarm(it, message, title, if (withSound) R.raw.boluserror else 0) diff --git a/omnipod-dash/src/main/res/xml/omnipod_dash_preferences.xml b/omnipod-dash/src/main/res/xml/omnipod_dash_preferences.xml index 0e812a9709..e53a64c3ac 100644 --- a/omnipod-dash/src/main/res/xml/omnipod_dash_preferences.xml +++ b/omnipod-dash/src/main/res/xml/omnipod_dash_preferences.xml @@ -104,12 +104,7 @@ android:key="@string/key_common_preferences_category_other_settings" android:title="@string/omnipod_common_preferences_category_other" app:initialExpandedChildrenCount="0"> - - - +