mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-23 07:58:09 +00:00
src/apps/common/request_pin: fix flickering
This commit is contained in:
parent
34f722f2df
commit
d49fa2fb9c
@ -16,13 +16,19 @@ async def request_pin(code: int = None) -> str:
|
|||||||
def onchange():
|
def onchange():
|
||||||
c = dialog.cancel
|
c = dialog.cancel
|
||||||
if matrix.pin:
|
if matrix.pin:
|
||||||
c.normal_style = ui.BTN_CLEAR['normal']
|
back = res.load(ui.ICON_BACK)
|
||||||
c.content = res.load(ui.ICON_BACK)
|
if c.content is not back:
|
||||||
|
c.normal_style = ui.BTN_CLEAR['normal']
|
||||||
|
c.content = back
|
||||||
|
c.taint()
|
||||||
|
c.render()
|
||||||
else:
|
else:
|
||||||
c.normal_style = ui.BTN_CANCEL['normal']
|
lock = res.load(ui.ICON_LOCK)
|
||||||
c.content = res.load(ui.ICON_LOCK)
|
if c.content is not lock:
|
||||||
c.taint()
|
c.normal_style = ui.BTN_CANCEL['normal']
|
||||||
c.render()
|
c.content = lock
|
||||||
|
c.taint()
|
||||||
|
c.render()
|
||||||
|
|
||||||
ui.display.clear()
|
ui.display.clear()
|
||||||
matrix = PinMatrix(label, with_zero=True)
|
matrix = PinMatrix(label, with_zero=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user