refactor: move UI text logic to view model

This commit is contained in:
andrekir 2023-04-13 17:20:26 -03:00
parent 28b905db23
commit e050ebd2a9
2 changed files with 11 additions and 10 deletions

View file

@ -100,7 +100,11 @@ class BTScanModel @Inject constructor(
}
var selectedAddress: String? = null
val errorText = object : MutableLiveData<String?>(null) {}
val errorText = MutableLiveData<String?>(null)
fun setErrorText(text: String) {
errorText.value = text
}
private var scanner: BluetoothLeScanner? = null