Skip to content

Commit

Permalink
fix: report bond state before connection state
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorbell committed Jan 7, 2025
1 parent f9021f2 commit bd1a18b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -440,6 +438,9 @@ open class ReactiveBleClient(private val context: Context) : BleClient {
)
}
}

connectionUpdateBehaviorSubject.onNext(update)

}

private val bondStateReceiver = object : BroadcastReceiver() {
Expand Down

0 comments on commit bd1a18b

Please sign in to comment.