fix offroad alert precedence (#21517)

old-commit-hash: 5a20cc6cae95f0f3eb7518acbce8fa380fb9ad80
This commit is contained in:
Adeeb Shihadeh
2021-07-07 20:07:27 -07:00
committed by GitHub
parent c3f5996920
commit b4e26fa46b
+1 -1
View File
@@ -97,7 +97,6 @@ void OffroadAlert::refresh() {
void OffroadAlert::updateAlerts() {
alertCount = 0;
updateAvailable = params.getBool("UpdateAvailable");
for (const auto& [key, label] : alerts) {
auto bytes = params.get(key.c_str());
if (bytes.size()) {
@@ -109,4 +108,5 @@ void OffroadAlert::updateAlerts() {
label->setText("");
}
}
updateAvailable = params.getBool("UpdateAvailable") && alertCount < 1;
}