OSUpdate: make sure still foreground before showing update info

This commit is contained in:
Thomas Farstrike
2026-01-13 01:13:02 +01:00
parent cc5f563875
commit 7842ebb74f
@@ -194,11 +194,12 @@ class OSUpdate(Activity):
try:
# Use UpdateChecker to fetch update info
update_info = self.update_checker.fetch_update_info(hwid)
self.handle_update_info(
update_info["version"],
update_info["download_url"],
update_info["changelog"]
)
if self.has_foreground():
self.handle_update_info(
update_info["version"],
update_info["download_url"],
update_info["changelog"]
)
except ValueError as e:
# JSON parsing or validation error (not network related)
self.set_state(UpdateState.ERROR)