mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: simplify wantConfig feedback
This commit is contained in:
parent
88a6bcc09d
commit
814cf41f90
6 changed files with 26 additions and 59 deletions
|
|
@ -50,6 +50,7 @@ class BTScanModel @Inject constructor(
|
|||
|
||||
private val context: Context get() = application.applicationContext
|
||||
val devices = MutableLiveData<MutableMap<String, DeviceListEntry>>(mutableMapOf())
|
||||
val errorText = MutableLiveData<String?>(null)
|
||||
|
||||
val isMockInterfaceAddressValid: Boolean by lazy {
|
||||
radioInterfaceService.isAddressValid(radioInterfaceService.mockInterfaceAddress)
|
||||
|
|
@ -87,6 +88,10 @@ class BTScanModel @Inject constructor(
|
|||
}
|
||||
}.launchIn(viewModelScope)
|
||||
|
||||
serviceRepository.statusMessage
|
||||
.onEach { errorText.value = it }
|
||||
.launchIn(viewModelScope)
|
||||
|
||||
debug("BTScanModel created")
|
||||
}
|
||||
|
||||
|
|
@ -134,8 +139,6 @@ class BTScanModel @Inject constructor(
|
|||
debug("BTScanModel cleared")
|
||||
}
|
||||
|
||||
val errorText = MutableLiveData<String?>(null)
|
||||
|
||||
fun setErrorText(text: String) {
|
||||
errorText.value = text
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue