mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: improve BluetoothState.bondedDevices updates
- add `BluetoothState` updates from `BluetoothDevice.ACTION_BOND_STATE_CHANGED` intents - convert `bondedDevices` to List instead of nested Flow
This commit is contained in:
parent
cdea292169
commit
b41d92be32
5 changed files with 27 additions and 30 deletions
|
|
@ -50,10 +50,10 @@ class BTScanModel @Inject constructor(
|
|||
|
||||
init {
|
||||
combine(
|
||||
bluetoothRepository.state.value.bondedDevices,
|
||||
bluetoothRepository.state,
|
||||
usbRepository.serialDevicesWithDrivers
|
||||
) { ble, usb ->
|
||||
bleDevices.value = ble
|
||||
bleDevices.value = ble.bondedDevices
|
||||
usbDevices.value = usb
|
||||
}.onEach { setupScan() }.launchIn(viewModelScope)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue