mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-21 22:08:08 +00:00
fix(core/homescreen): properly redraw when an outside process kills homescreen
This happens with FIDO which does not use the normal workflow management and so `workflow.close_others()` is never called.
This commit is contained in:
parent
411a7bb802
commit
959cf7d515
@ -16,6 +16,15 @@ class HomescreenBase(ui.Layout):
|
|||||||
"apps/homescreen/res/bg.toif"
|
"apps/homescreen/res/bg.toif"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async def __iter__(self) -> ui.ResultValue:
|
||||||
|
# We need to catch the ui.Cancelled exception that kills us, because that means
|
||||||
|
# that we will need to draw on screen again after restart.
|
||||||
|
try:
|
||||||
|
return await super().__iter__()
|
||||||
|
except ui.Cancelled:
|
||||||
|
storage.cache.homescreen_shown = None
|
||||||
|
raise
|
||||||
|
|
||||||
def on_render(self) -> None:
|
def on_render(self) -> None:
|
||||||
if not self.repaint:
|
if not self.repaint:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user