1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

core/debug: at start, wait for first layout to show up

This commit is contained in:
matejcik 2019-10-22 13:51:39 +02:00
parent f22f4d920e
commit 8d2ae142f3

View File

@ -30,7 +30,7 @@ if __debug__:
debuglink_decision_chan = loop.chan()
layout_change_chan = loop.chan()
current_content = [] # type: List[str]
current_content = None # type: Optional[List[str]]
def notify_layout_change(layout: ui.Layout) -> None:
global current_content
@ -95,7 +95,7 @@ if __debug__:
m.passphrase_protection = has_passphrase()
m.reset_entropy = reset_internal_entropy
if msg.wait_layout:
if msg.wait_layout or current_content is None:
m.layout_lines = await layout_change_chan.take()
else:
m.layout_lines = current_content