clear the device list anytime we restart the BLE scan

pull/40/head
geeksville 2020-06-09 09:11:10 -07:00
rodzic 3661fd157e
commit 1cd0e1692d
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -276,6 +276,9 @@ class BTScanModel(app: Application) : AndroidViewModel(app), Logging {
if (scanner == null) { if (scanner == null) {
debug("starting scan") debug("starting scan")
// Clear the old device list
devices.value?.clear()
// Include a placeholder for "None" // Include a placeholder for "None"
addDevice(DeviceListEntry(context.getString(R.string.none), "n", true)) addDevice(DeviceListEntry(context.getString(R.string.none), "n", true))