merge CommandConfirmed and CommandDenied
This commit is contained in:
parent
ee73cd5f2b
commit
9e770601f3
|
@ -66,7 +66,5 @@ sealed class PodEvent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data class CommandConfirmed(val historyId: String) : PodEvent()
|
data class CommandConfirmed(val historyId: String, success: Boolean) : PodEvent()
|
||||||
|
|
||||||
data class CommandDenied(val historyId: String) : PodEvent()
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,9 +224,9 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
|
||||||
else {
|
else {
|
||||||
podState.activeCommand = null
|
podState.activeCommand = null
|
||||||
if (sequenceNumberOfLastProgrammingCommand == sequence)
|
if (sequenceNumberOfLastProgrammingCommand == sequence)
|
||||||
source.onSuccess(PodEvent.CommandConfirmed(historyId))
|
source.onSuccess(PodEvent.CommandConfirmed(historyId, true))
|
||||||
else
|
else
|
||||||
source.onSuccess(PodEvent.CommandDenied(historyId))
|
source.onSuccess(PodEvent.CommandConfirmed(historyId, false))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?: source.onComplete() // no active programming command
|
?: source.onComplete() // no active programming command
|
||||||
|
|
Loading…
Reference in a new issue