mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 22:18:13 +00:00
fixup! chore(core): update core to reflect cache and context refactor [no changelog]
This commit is contained in:
parent
3f3a7edc41
commit
3edd08fb1e
@ -8,6 +8,7 @@ import trezorui2
|
||||
from trezor import io, log, loop, utils, wire, workflow
|
||||
from trezor.messages import ButtonAck, ButtonRequest
|
||||
from trezor.wire import context
|
||||
from trezor.wire.protocol_common import Context
|
||||
from trezorui2 import BacklightLevels, LayoutState
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@ -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
|
||||
|
||||
def is_ready(self) -> bool:
|
||||
@ -213,7 +214,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)
|
||||
|
Loading…
Reference in New Issue
Block a user