format. refresh Overview

This commit is contained in:
Andrei Vereha 2021-07-25 15:18:59 +02:00
parent ba5529e868
commit 2e8a81f38d

View file

@ -9,6 +9,7 @@ import info.nightscout.androidaps.data.DetailedBolusInfo
import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.data.PumpEnactResult
import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.events.EventPreferenceChange
import info.nightscout.androidaps.events.EventProfileSwitchChanged import info.nightscout.androidaps.events.EventProfileSwitchChanged
import info.nightscout.androidaps.events.EventRefreshOverview
import info.nightscout.androidaps.events.EventTempBasalChange import info.nightscout.androidaps.events.EventTempBasalChange
import info.nightscout.androidaps.interfaces.* import info.nightscout.androidaps.interfaces.*
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
@ -231,9 +232,9 @@ class OmnipodDashPumpPlugin @Inject constructor(
name = "ConnectionThread", name = "ConnectionThread",
) { ) {
try { try {
stopConnecting?.let{ stopConnecting?.let {
val error = omnipodManager.connect(it).ignoreElements().blockingGet() val error = omnipodManager.connect(it).ignoreElements().blockingGet()
aapsLogger.info(LTag.PUMPCOMM, "connect error=${error}") aapsLogger.info(LTag.PUMPCOMM, "connect error=$error")
} }
} finally { } finally {
synchronized(this) { synchronized(this) {
@ -1203,11 +1204,17 @@ class OmnipodDashPumpPlugin @Inject constructor(
.map { handleCommandConfirmation(it) } .map { handleCommandConfirmation(it) }
.ignoreElement(), .ignoreElement(),
checkPodKaput(), checkPodKaput(),
refreshOverview(),
post, post,
) )
) )
} }
private fun refreshOverview(): Completable = Completable.defer {
rxBus.send(EventRefreshOverview("Dash command", false))
Completable.complete()
}
private fun handleCommandConfirmation(confirmation: CommandConfirmed) { private fun handleCommandConfirmation(confirmation: CommandConfirmed) {
val command = confirmation.command val command = confirmation.command
val historyEntry = history.getById(command.historyId) val historyEntry = history.getById(command.historyId)