From 0bcc801bc468e9c8e586f4ebcde47f7a905cc2f5 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Sat, 7 Feb 2026 15:27:20 -0600 Subject: [PATCH] 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> --- .../java/com/geeksville/mesh/service/MeshConnectionManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/geeksville/mesh/service/MeshConnectionManager.kt b/app/src/main/java/com/geeksville/mesh/service/MeshConnectionManager.kt index f64ec3a9f..795276186 100644 --- a/app/src/main/java/com/geeksville/mesh/service/MeshConnectionManager.kt +++ b/app/src/main/java/com/geeksville/mesh/service/MeshConnectionManager.kt @@ -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()