fix command recovery on start
This commit is contained in:
parent
bf81db0f6e
commit
21b78562e2
1 changed files with 2 additions and 2 deletions
|
@ -436,7 +436,7 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
|
||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
when (getCommandConfirmationFromState()) {
|
when (getCommandConfirmationFromState()) {
|
||||||
CommandConfirmationSuccess, CommandConfirmationDenied -> {
|
CommandConfirmationSuccess, CommandConfirmationDenied -> {
|
||||||
val now = System.currentTimeMillis()
|
val now = SystemClock.elapsedRealtime()
|
||||||
val newCommand = podState.activeCommand?.copy(
|
val newCommand = podState.activeCommand?.copy(
|
||||||
createdRealtime = now,
|
createdRealtime = now,
|
||||||
sentRealtime = now + 1
|
sentRealtime = now + 1
|
||||||
|
@ -446,7 +446,7 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandSendingNotConfirmed -> {
|
CommandSendingNotConfirmed -> {
|
||||||
val now = System.currentTimeMillis()
|
val now = SystemClock.elapsedRealtime()
|
||||||
val newCommand = podState.activeCommand?.copy(
|
val newCommand = podState.activeCommand?.copy(
|
||||||
createdRealtime = now,
|
createdRealtime = now,
|
||||||
sentRealtime = now + 1
|
sentRealtime = now + 1
|
||||||
|
|
Loading…
Reference in a new issue