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

trezor.ui: fix of fix confirmation

This commit is contained in:
Peter Jensen 2017-03-22 15:15:12 +01:00
parent 0723f6c198
commit 4c206be585

View File

@ -32,9 +32,8 @@ class ConfirmDialog(Widget):
if self.cancel.touch(event, pos) == BTN_CLICKED: if self.cancel.touch(event, pos) == BTN_CLICKED:
return CANCELLED return CANCELLED
def __iter__(self): async def __iter__(self):
result = yield loop.Wait((super().__iter__(), self.content)) return await loop.Wait((super().__iter__(), self.content))
return result
class HoldToConfirmDialog(Widget): class HoldToConfirmDialog(Widget):
@ -68,9 +67,8 @@ class HoldToConfirmDialog(Widget):
if self.content is not None: if self.content is not None:
return self.content.send(event, pos) return self.content.send(event, pos)
def __iter__(self): async def __iter__(self):
result = yield loop.Wait((self._render_loop(), self._event_loop())) return await loop.Wait((self._render_loop(), self._event_loop()))
return result
def _render_loop(self): def _render_loop(self):
RENDER_DELAY = const(1000000 // 60) RENDER_DELAY = const(1000000 // 60)