mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix software update button
This commit is contained in:
parent
7bd6615cb7
commit
7faf4d2d79
2 changed files with 4 additions and 3 deletions
|
|
@ -484,10 +484,12 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
|||
updateProgressBar.progress = service.updateStatus
|
||||
delay(2000) // Only check occasionally
|
||||
}
|
||||
|
||||
val isSuccess = (service.updateStatus == -1)
|
||||
scanStatusText.text =
|
||||
if (service.updateStatus == -1) "Update successful" else "Update failed"
|
||||
if (isSuccess) "Update successful" else "Update failed"
|
||||
updateProgressBar.isEnabled = false
|
||||
updateFirmwareButton.isEnabled = true
|
||||
updateFirmwareButton.isEnabled = !isSuccess
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue