1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-07 14:00:57 +00:00

fixup! chore(core): update core to reflect cache and context refactor [no changelog]

This commit is contained in:
M1nd3r 2024-11-18 15:12:39 +01:00
parent 587813ce3d
commit 385d4ce7bd

View File

@ -9,6 +9,7 @@ from trezor import io, log, loop, utils, wire, workflow
from trezor.messages import ButtonAck, ButtonRequest
from trezor.wire import context
from trezorui2 import AttachType, BacklightLevels, LayoutState
from trezor.wire.protocol_common import Context
if TYPE_CHECKING:
from typing import Any, Callable, Generator, Generic, Iterator, TypeVar
@ -166,7 +167,7 @@ class Layout(Generic[T]):
self.button_request_ack_pending: bool = False
self.transition_out: AttachType | None = None
self.backlight_level = BacklightLevels.NORMAL
self.context: context.Context | None = None
self.context: Context | None = None
self.state: LayoutState = LayoutState.INITIAL
# Indicates whether we should use Resume attach style when launching.
@ -217,7 +218,7 @@ class Layout(Generic[T]):
set_current_layout(self)
# save context
self.context = context.CURRENT_CONTEXT
self.context = context.get_context()
# attach a timer callback and paint self
self._event(self.layout.attach_timer_fn, self._set_timer, transition_in)