Skip to content
Snippets Groups Projects
Commit 3c56c310 authored by ave's avatar ave Committed by ave
Browse files

st3m/application: Only trigger wifi actions if properly exiting the app

parent af3912aa
Branches
No related tags found
No related merge requests found
...@@ -59,9 +59,12 @@ class Application(BaseView): ...@@ -59,9 +59,12 @@ class Application(BaseView):
super().on_enter(vm) super().on_enter(vm)
def on_exit(self) -> None: def on_exit(self) -> None:
fully_exiting = not self.vm._history or not isinstance(
self.vm._history[-1], type(self)
)
# If the app requested to change wifi state # If the app requested to change wifi state
# fall back to system defaults on exit # fall back to system defaults on exit
if self._wifi_preference is not None: if fully_exiting and self._wifi_preference is not None:
st3m.wifi._onoff_wifi_update() st3m.wifi._onoff_wifi_update()
super().on_exit() super().on_exit()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment