fix: move device list sorting to ViewModel

This commit is contained in:
andrekir 2024-11-11 17:58:15 -03:00
parent 7e54ad950c
commit 417523967e
2 changed files with 2 additions and 8 deletions

View file

@ -70,9 +70,7 @@ class BTScanModel @Inject constructor(
}
// Include paired Bluetooth devices
ble.bondedDevices.forEach {
addDevice(BLEDeviceListEntry(it))
}
ble.bondedDevices.map(::BLEDeviceListEntry).sortedBy { it.name }.forEach(::addDevice)
// Include Network Service Discovery
tcp.forEach { service ->