From bbf286e05054c2068a38ae46a0cb67af0ef241ad Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 18 Feb 2022 15:43:55 +0100 Subject: [PATCH] fix(core/debug): only wait for layout when _enabling_ watch_layout --- core/.changelog.d/2135.changed | 1 + core/src/apps/debug/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 core/.changelog.d/2135.changed diff --git a/core/.changelog.d/2135.changed b/core/.changelog.d/2135.changed new file mode 100644 index 000000000..ef6d17fcf --- /dev/null +++ b/core/.changelog.d/2135.changed @@ -0,0 +1 @@ +\[debuglink] Do not wait for screen refresh when _disabling_ layout watching. diff --git a/core/src/apps/debug/__init__.py b/core/src/apps/debug/__init__.py index 8649ac93f..2dcfaf2da 100644 --- a/core/src/apps/debug/__init__.py +++ b/core/src/apps/debug/__init__.py @@ -114,7 +114,8 @@ if __debug__: from trezor import ui layout_change_chan.putters.clear() - await ui.wait_until_layout_is_running() + if msg.watch: + await ui.wait_until_layout_is_running() storage.watch_layout_changes = bool(msg.watch) log.debug(__name__, "Watch layout changes: %s", storage.watch_layout_changes) return Success()