mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-22 08:43:54 +08:00
mici setup: guard continue button when forgetting/connecting (#37568)
* test * fix * test * too much * simple to ship * revert * bug free * simpler * fix * even safer guard
This commit is contained in:
@@ -110,6 +110,10 @@ class WifiButton(BigButton):
|
||||
if self._is_connected or self._is_connecting:
|
||||
self._wrong_password = False
|
||||
|
||||
@property
|
||||
def network_forgetting(self) -> bool:
|
||||
return self._network_forgetting
|
||||
|
||||
def _forget_network(self):
|
||||
if self._network_forgetting:
|
||||
return
|
||||
@@ -286,6 +290,11 @@ class WifiUIMici(NavScroller):
|
||||
networks_updated=self._on_network_updated,
|
||||
)
|
||||
|
||||
@property
|
||||
def any_network_forgetting(self) -> bool:
|
||||
# TODO: deactivate before forget and add DISCONNECTING state
|
||||
return any(btn.network_forgetting for btn in self._scroller.items if isinstance(btn, WifiButton))
|
||||
|
||||
def show_event(self):
|
||||
# Clear scroller items and update from latest scan results
|
||||
super().show_event()
|
||||
|
||||
Reference in New Issue
Block a user