feat: collect bondedDevices flow in BTScanModel

This commit is contained in:
andrekir 2023-03-27 15:27:26 -03:00
parent 84c85a8c3e
commit 057f94e423
4 changed files with 13 additions and 19 deletions

View file

@ -290,10 +290,6 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
regionAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
spinner.adapter = regionAdapter
bluetoothViewModel.enabled.observe(viewLifecycleOwner) { enabled ->
if (enabled) scanModel.setupScan()
}
model.ownerName.observe(viewLifecycleOwner) { name ->
binding.usernameEditText.isEnabled = !name.isNullOrEmpty()
binding.usernameEditText.setText(name)