From 7ea53c089e33f1b26b286098b8e14463a312d97c Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Tue, 23 Apr 2019 02:07:06 +0200 Subject: [PATCH] xmr: indeterminate progress for live refresh --- core/src/apps/monero/layout/confirms.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/apps/monero/layout/confirms.py b/core/src/apps/monero/layout/confirms.py index ac47f04f55..b02819e1df 100644 --- a/core/src/apps/monero/layout/confirms.py +++ b/core/src/apps/monero/layout/confirms.py @@ -171,5 +171,13 @@ async def live_refresh_step(ctx, current): return ui.display.clear() text = Text("Refreshing", ui.ICON_SEND, icon_color=ui.BLUE) - text.normal("%d" % current) text.render() + + step = 6 + p = int(1000.0 * (current / step)) % 1000 + if p == 0 and current > 0: + p = 1000 + + ui.display.loader(p, 18, ui.WHITE, ui.BG, None, 0, 1000 // step) + ui.display.text_center(ui.WIDTH // 2, 145, "%d" % current, ui.NORMAL, ui.FG, ui.BG) + ui.display.refresh()