From bd1a18b2d47dae8b706bbac6e597f47c181b1c0b Mon Sep 17 00:00:00 2001 From: taylorbell Date: Mon, 6 Jan 2025 18:07:19 -0600 Subject: [PATCH] fix: report bond state before connection state --- .../signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt index 23de65d5..276ffdb1 100644 --- a/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt +++ b/packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/ble/ReactiveBleClient.kt @@ -424,8 +424,6 @@ open class ReactiveBleClient(private val context: Context) : BleClient { ) private fun onConnectionUpdate(update: ConnectionUpdate) { - connectionUpdateBehaviorSubject.onNext(update) - when (update) { is ConnectionUpdateSuccess -> { val device = rxBleClient.getBleDevice(update.deviceId) @@ -440,6 +438,9 @@ open class ReactiveBleClient(private val context: Context) : BleClient { ) } } + + connectionUpdateBehaviorSubject.onNext(update) + } private val bondStateReceiver = object : BroadcastReceiver() {