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

py,st3m: ViewManager: Move input handling after transition handling

Otherwise it defeats the mechanism to ignore the first think,
which can be easily seen when exiting Settings view (with its heavy
on_exit) via the OS button.
parent 6dfbad01
No related branches found
No related tags found
No related merge requests found
......@@ -205,13 +205,6 @@ class ViewManager(Responder):
def think(self, ins: InputState, delta_ms: int) -> None:
self._input.think(ins, delta_ms)
if self._input.buttons.os.middle.pressed:
if not self._history and self._debug:
utime.sleep(0.5)
machine.reset()
else:
self.pop(ViewTransitionSwipeRight())
if self._transitioning:
if not self._first_think:
self._transition += (delta_ms / 1000.0) * (1000 / self._time_ms)
......@@ -223,6 +216,13 @@ class ViewManager(Responder):
if self._fully_drawn > 3: # TODO: use actual pipeline depth
self._end_transition()
if self._input.buttons.os.middle.pressed:
if not self._history and self._debug:
utime.sleep(0.5)
machine.reset()
else:
self.pop(ViewTransitionSwipeRight())
if self._outgoing is not None:
self._outgoing.think(ins, delta_ms)
if self._incoming is not None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment