update on CommandSendNotConfirmed
This commit is contained in:
parent
0fad1bc6c7
commit
d3c73f9665
|
@ -652,6 +652,17 @@ class OmnipodDashManagerImpl @Inject constructor(
|
|||
podStateManager.increaseMessageSequenceNumber()
|
||||
}
|
||||
|
||||
is PodEvent.CommandSendNotConfirmed -> {
|
||||
podStateManager.activeCommand?.let {
|
||||
if (it.sequence == event.command.sequenceNumber) {
|
||||
it.sentRealtime = SystemClock.elapsedRealtime()
|
||||
}
|
||||
}
|
||||
podStateManager.increaseMessageSequenceNumber()
|
||||
// TODO: is it bad if we increment this sequence number when we failed to send the command?
|
||||
}
|
||||
|
||||
|
||||
is PodEvent.ResponseReceived -> {
|
||||
podStateManager.increaseMessageSequenceNumber()
|
||||
handleResponse(event.response)
|
||||
|
|
Loading…
Reference in a new issue