mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-16 21:06:40 -04:00
fix upaired warning update when user changes radio buttons
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user