mirror of
https://jihulab.com/mr-one/openpilot.git
synced 2026-10-27 21:13:42 +08:00
ui: guard branch switcher before internet connected (#38692)
(cherry picked from commit 839d3f500474e7726f50cc273fe750e8a05222bd)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user