feat(core): drop support for after-step-hook

This was necessary for hooking display.refresh() with the old UI toolkit.
With the new one, we explicitly refresh the display after every paint, so
implicit after-step refresh seems no longer necessary.
pull/3702/head
matejcik 2 months ago
parent b433c209b3
commit 17376dd284

@ -20,9 +20,6 @@ if TYPE_CHECKING:
AwaitableTask = Task | Awaitable
Finalizer = Callable[[Task, Any], None]
# function to call after every task step
after_step_hook: Callable[[], None] | None = None
# tasks scheduled for execution in the future
_queue = utimeq.utimeq(64)
@ -179,8 +176,6 @@ def _step(task: Task, value: Any) -> None:
else:
if __debug__:
log.error(__name__, "unknown syscall: %s", result)
if after_step_hook:
after_step_hook()
class Syscall:

@ -51,12 +51,6 @@ if __debug__:
else:
refresh = display.refresh # type: ignore [obscured-by-same-name]
# in both debug and production, emulator needs to draw the screen explicitly
if utils.EMULATOR or utils.INTERNAL_MODEL in ("T1B1", "T2B1"):
loop.after_step_hook = refresh
# import style later to avoid circular dep
from trezor.ui import style # isort:skip

Loading…
Cancel
Save