1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00

src/apps/common/request_pin: fix flickering

This commit is contained in:
Jan Pochyla 2018-02-20 16:50:28 +01:00
parent 34f722f2df
commit d49fa2fb9c

View File

@ -16,11 +16,17 @@ async def request_pin(code: int = None) -> str:
def onchange(): def onchange():
c = dialog.cancel c = dialog.cancel
if matrix.pin: if matrix.pin:
back = res.load(ui.ICON_BACK)
if c.content is not back:
c.normal_style = ui.BTN_CLEAR['normal'] c.normal_style = ui.BTN_CLEAR['normal']
c.content = res.load(ui.ICON_BACK) c.content = back
c.taint()
c.render()
else: else:
lock = res.load(ui.ICON_LOCK)
if c.content is not lock:
c.normal_style = ui.BTN_CANCEL['normal'] c.normal_style = ui.BTN_CANCEL['normal']
c.content = res.load(ui.ICON_LOCK) c.content = lock
c.taint() c.taint()
c.render() c.render()