ui: guard branch switcher before internet connected (#38692)

(cherry picked from commit 839d3f500474e7726f50cc273fe750e8a05222bd)
This commit is contained in:
Trey Moen
2026-08-28 12:06:33 -07:00
committed by Comma Device
parent e97fea466a
commit 41f0b118bf
@@ -246,6 +246,9 @@ class TargetBranchButton(BigButton):
self.set_value(target)
def _on_click(self):
if not ui_state.params.get("UpdaterAvailableBranches"):
gui_app.push_widget(BigDialog("", tr("Please connect to Wi-Fi to switch branches.")))
return
gui_app.push_widget(BranchSelectPage(self._on_select))
def _on_select(self, branch: str):