ktlintFormat

This commit is contained in:
Andrei Vereha 2021-11-09 23:26:44 +01:00
parent aa58b37643
commit 247768c139
2 changed files with 31 additions and 31 deletions

View file

@ -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)

View file

@ -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
}
}