mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix(config): show error when radio disconnects before receiving confirmation
This commit is contained in:
parent
abcc2e89ec
commit
8af78bc2eb
2 changed files with 10 additions and 1 deletions
|
|
@ -100,6 +100,12 @@ class RadioConfigViewModel @Inject constructor(
|
|||
radioConfigRepository.meshPacketFlow.onEach(::processPacketResponse)
|
||||
.launchIn(viewModelScope)
|
||||
|
||||
combine(connectionState, radioConfigState) { connState, configState ->
|
||||
if (connState.isDisconnected() && configState.responseState.isWaiting()) {
|
||||
setResponseStateError(app.getString(R.string.disconnected))
|
||||
}
|
||||
}.launchIn(viewModelScope)
|
||||
|
||||
debug("RadioConfigViewModel created")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue