mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-02 05:04:37 -04:00
fix: initialize devices before constructor execution
This commit is contained in:
@@ -43,6 +43,7 @@ class BTScanModel @Inject constructor(
|
||||
) : ViewModel(), Logging {
|
||||
|
||||
private val context: Context get() = application.applicationContext
|
||||
val devices = MutableLiveData<MutableMap<String, DeviceListEntry>>(mutableMapOf())
|
||||
|
||||
init {
|
||||
bluetoothRepository.state.value.bondedDevices.onEach {
|
||||
@@ -341,8 +342,6 @@ class BTScanModel @Inject constructor(
|
||||
)
|
||||
}
|
||||
|
||||
val devices = MutableLiveData<MutableMap<String, DeviceListEntry>>(mutableMapOf())
|
||||
|
||||
private val _changeDeviceAddress = MutableLiveData<String?>(null)
|
||||
val changeDeviceAddress: LiveData<String?> get() = _changeDeviceAddress
|
||||
|
||||
|
||||
Reference in New Issue
Block a user