1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 03:50:58 +00:00

homescreen: do not return from homescreen workflow

This commit is contained in:
Jan Pochyla 2019-04-10 17:44:54 +02:00 committed by Pavol Rusnak
parent c462918e3e
commit bd812fecf9
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -1,13 +1,19 @@
from trezor import config, res, ui from trezor import config, io, loop, res, ui
from apps.common import storage from apps.common import storage
async def homescreen(): async def homescreen():
# render homescreen in dimmed mode and fade back in
await ui.backlight_slide(ui.BACKLIGHT_DIM) await ui.backlight_slide(ui.BACKLIGHT_DIM)
display_homescreen() display_homescreen()
await ui.backlight_slide(ui.BACKLIGHT_NORMAL) await ui.backlight_slide(ui.BACKLIGHT_NORMAL)
# loop forever, never return
touch = loop.wait(io.TOUCH)
while True:
await touch
def display_homescreen(): def display_homescreen():
if not storage.is_initialized(): if not storage.is_initialized():