mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Always notify on connection changes
This commit modifies the `onConnectionChanged` function to ensure that all connection state changes are reported, including transitions to the same state. Previously, redundant notifications were suppressed unless the state was `Connected`. This change allows for consistent handling of all connection events. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
8c46a0c946
commit
0bcc801bc4
1 changed files with 1 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ constructor(
|
|||
}
|
||||
|
||||
private fun onConnectionChanged(c: ConnectionState) {
|
||||
if (connectionStateHolder.connectionState.value == c && c !is ConnectionState.Connected) return
|
||||
if (connectionStateHolder.connectionState.value == c) return
|
||||
Logger.d { "onConnectionChanged: ${connectionStateHolder.connectionState.value} -> $c" }
|
||||
|
||||
sleepTimeout?.cancel()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue