diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-10-20 01:51:05 +0200 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-10-20 01:51:05 +0200 |
| commit | d537f4e154a40075405b0ab2fed14fbe2eeaac81 (patch) | |
| tree | f1fb9b148871901dda96fca11401d6f4d0ee1d59 /source/ui/ListView.mc | |
| parent | 40d9a1d5c3e85486aea964c1446402a3be6ec05a (diff) | |
feat(settings): apply the Import form from the phone and show results
Import group in the app settings; the processor runs after the first
frame and on settings changes, clears the fields, writes the status,
remembers form hashes and opens the results screen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'source/ui/ListView.mc')
| -rw-r--r-- | source/ui/ListView.mc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/ui/ListView.mc b/source/ui/ListView.mc index ab0e594..cc4e5f3 100644 --- a/source/ui/ListView.mc +++ b/source/ui/ListView.mc @@ -119,6 +119,8 @@ class ListView extends WatchUi.View { var mode = vault.hasPin() ? PinView.MODE_UNLOCK : PinView.MODE_CREATE; WatchUi.pushView(new PinView(mode, null), new PinDelegate(), WatchUi.SLIDE_LEFT); } + // Settings forms are applied after the first frame (README 10.3). + AppState.processSettings(); } // One-shot timer: start-up checks after the first frame, and further @@ -149,7 +151,7 @@ class ListView extends WatchUi.View { var titleFont = Graphics.FONT_XTINY; var titleY = Ui.isRound() ? h / 12 : 4; dc.setColor(Ui.accent(), Graphics.COLOR_TRANSPARENT); - dc.drawText(w / 2, titleY, titleFont, "OTP Wallet", Graphics.TEXT_JUSTIFY_CENTER); + dc.drawText(w / 2, titleY, titleFont, title(), Graphics.TEXT_JUSTIFY_CENTER); var listTop = titleY + dc.getFontHeight(titleFont) + 2; var listBottom = Ui.isRound() ? h - h / 12 : h - 4; @@ -176,6 +178,17 @@ class ListView extends WatchUi.View { } } + // "Importing… 40%" while an import runs, "Results ready" when settings + // results haven't been looked at, else the app name. + private function title() as String { + var p = AppState.processor; + var busy = p != null ? p.busyText() : null; + if (busy != null) { + return busy; + } + return Results.unseen() ? "Results ready (menu)" : "OTP Wallet"; + } + private function drawEmpty(dc as Graphics.Dc, top as Number, bottom as Number) as Void { var w = dc.getWidth(); var y = (top + bottom) / 2 - dc.getFontHeight(Graphics.FONT_SMALL); |
