fix upaired warning update when user changes radio buttons

This commit is contained in:
geeksville
2020-06-09 08:09:01 -07:00
parent 4ba7acc307
commit aa5cd9baf8
2 changed files with 3 additions and 2 deletions

View File

@@ -173,7 +173,7 @@ class BTScanModel(app: Application) : AndroidViewModel(app), Logging {
val isBonded = result.device.bondState == BluetoothDevice.BOND_BONDED
val oldDevs = devices.value!!
val oldEntry = oldDevs[fullAddr]
if (oldEntry == null || oldEntry.bonded != isBonded) {
if (oldEntry == null || oldEntry.bonded != isBonded) { // Don't spam the GUI with endless updates for non changing nodes
val skipBogus = try {
// Note Soyes XS has a buggy BLE scan implementation and returns devices we didn't ask for. So we check to see if the
@@ -407,6 +407,7 @@ class BTScanModel(app: Application) : AndroidViewModel(app), Logging {
info("Changing device to ${newAddr.anonymize}")
selectedAddress = newAddr
changeDeviceSelection(context, newAddr)
devices.value = devices.value // Force a GUI update
}
}

View File

@@ -61,5 +61,5 @@
<string name="update_to">Update to %s</string>
<string name="app_too_old">Application too old</string>
<string name="must_update">You must update this application on the Google Play store (or Github). It is too old to talk to this radio.</string>
<string name="none">None</string>
<string name="none">None (disable)</string>
</resources>