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.
pull/1610/head
matejcik 3 years ago committed by matejcik
parent 411a7bb802
commit 959cf7d515

@ -16,6 +16,15 @@ class HomescreenBase(ui.Layout):
"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:
if not self.repaint:
return

Loading…
Cancel
Save