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:
James Rich
2026-02-07 15:27:20 -06:00
parent 8c46a0c946
commit 0bcc801bc4

View File

@@ -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()