format. refresh Overview
This commit is contained in:
parent
ba5529e868
commit
2e8a81f38d
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||||
|
@ -233,7 +234,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue