1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-17 10:51:00 +00:00

fix(core): completely repaint layouts before showing them in a loop

[no changelog]
This commit is contained in:
grdddj 2023-11-22 14:56:46 +01:00 committed by matejcik
parent 6c4e0eec26
commit 8a6934e844
2 changed files with 17 additions and 9 deletions

View File

@ -495,6 +495,7 @@ async def show_address(
br_code,
pages=layout.page_count(),
)
layout.request_complete_repaint()
result = await ctx_wait(layout)
# User confirmed with middle button.
@ -1106,6 +1107,7 @@ async def confirm_modify_output(
ButtonRequestType.ConfirmOutput,
address_layout.page_count(),
)
address_layout.request_complete_repaint()
await raise_if_not_confirmed(ctx_wait(address_layout))
if send_button_request:
@ -1115,6 +1117,7 @@ async def confirm_modify_output(
ButtonRequestType.ConfirmOutput,
modify_layout.page_count(),
)
modify_layout.request_complete_repaint()
result = await ctx_wait(modify_layout)
if result is CONFIRMED:

View File

@ -429,16 +429,18 @@ async def show_address(
details_title = "RECEIVING TO"
elif details_title is None:
details_title = title
while True:
layout = RustLayout(
trezorui2.confirm_address(
title=title,
data=address,
description=network or "",
extra=None,
chunkify=chunkify,
)
layout = RustLayout(
trezorui2.confirm_address(
title=title,
data=address,
description=network or "",
extra=None,
chunkify=chunkify,
)
)
while True:
if send_button_request:
send_button_request = False
await button_request(
@ -446,6 +448,7 @@ async def show_address(
br_code,
pages=layout.page_count(),
)
layout.request_complete_repaint()
result = await ctx_wait(layout)
# User pressed right button.
@ -1059,6 +1062,7 @@ async def confirm_modify_output(
ButtonRequestType.ConfirmOutput,
address_layout.page_count(),
)
address_layout.request_complete_repaint()
await raise_if_not_confirmed(ctx_wait(address_layout))
if send_button_request:
@ -1068,6 +1072,7 @@ async def confirm_modify_output(
ButtonRequestType.ConfirmOutput,
modify_layout.page_count(),
)
modify_layout.request_complete_repaint()
result = await ctx_wait(modify_layout)
if result is CONFIRMED: