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 CommandDenied(val historyId: String) : PodEvent()
|
||||
data class CommandConfirmed(val historyId: String, success: Boolean) : PodEvent()
|
||||
}
|
||||
|
|
|
@ -224,9 +224,9 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
|
|||
else {
|
||||
podState.activeCommand = null
|
||||
if (sequenceNumberOfLastProgrammingCommand == sequence)
|
||||
source.onSuccess(PodEvent.CommandConfirmed(historyId))
|
||||
source.onSuccess(PodEvent.CommandConfirmed(historyId, true))
|
||||
else
|
||||
source.onSuccess(PodEvent.CommandDenied(historyId))
|
||||
source.onSuccess(PodEvent.CommandConfirmed(historyId, false))
|
||||
}
|
||||
}
|
||||
?: source.onComplete() // no active programming command
|
||||
|
|
Loading…
Reference in a new issue