aboutsummaryrefslogtreecommitdiff
path: root/source/ui/ListView.mc
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-10-25 23:51:52 +0100
committercirakg <cirakg@cirakg.xyz>2026-10-25 23:51:52 +0100
commitb8addc87f804789368612bf8e1be31a2bf28efe1 (patch)
treebece4051eb6f009eba05ffdd585420232741a7d7 /source/ui/ListView.mc
parent140a6660f63f88d05ba9aae0bf1c4b401bb6574d (diff)
test(ui): second UI scenario, and the fixes it found
A second UI-test build (uitest-extra.jungle) covers the legacy PIN and the forced new PIN, Change and Reset PIN, a queued Require PIN, UPC-A, Code 39, the code error screen, the encoding progress, auto-lock on a barcode, the light theme and the glance without a code; the main flow adds the Steam and Library details and the menu's text screens. Fixed from what it found: Entry IDs tripped the watchdog with 110 entries; auto-lock didn't close a locked barcode; a queued Require PIN showed "Confirm in menu"; locked barcodes lacked the padlock; the PIN keypad's bottom row, the Reset PIN question, text-screen bottoms, the glance title and the light-theme warning colour. Goldens approved on all seven watches; only the Forerunner 70 was re-verified after the version bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'source/ui/ListView.mc')
-rw-r--r--source/ui/ListView.mc18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/ui/ListView.mc b/source/ui/ListView.mc
index de73cce..36df798 100644
--- a/source/ui/ListView.mc
+++ b/source/ui/ListView.mc
@@ -3,7 +3,8 @@
//
// Layout (README 13.1, 13.3): a title, then rows of two lines each (name;
// group and account) with the code and a countdown on the right for unlocked
-// OTP entries, a padlock for locked entries and a barcode icon for codes.
+// OTP entries, a padlock for locked entries (codes too: opening them asks
+// for the PIN) and a barcode icon for other codes.
// The focused row is outlined; the list scrolls to keep it visible and
// centres short lists. On round screens each row is as wide as the circle
// allows at its height.
@@ -186,7 +187,8 @@ class ListView extends WatchUi.View {
// "Importing… 40%" while an import runs, "Results ready" when settings
// results haven't been looked at, "Confirm in menu" while phone changes
- // wait for the PIN, else the app name.
+ // wait to be confirmed with the PIN (a waiting "Require PIN" applies at
+ // the next PIN by itself), else the app name.
private function title() as String {
var p = AppState.processor;
var busy = p != null ? p.busyText() : null;
@@ -197,7 +199,7 @@ class ListView extends WatchUi.View {
return "Results ready (menu)";
}
var v = AppState.vault;
- return v != null && ChangeQueue.count(v) > 0 ? "Confirm in menu" : "OTP Wallet";
+ return v != null && ChangeQueue.countToConfirm(v) > 0 ? "Confirm in menu" : "OTP Wallet";
}
private function drawEmpty(dc as Graphics.Dc, top as Number, bottom as Number) as Void {
@@ -283,7 +285,7 @@ class ListView extends WatchUi.View {
var right = x1 - 8;
if (header == null) {
- dc.setColor(Ui.WARN_COLOR, Graphics.COLOR_TRANSPARENT);
+ dc.setColor(Ui.warn(), Graphics.COLOR_TRANSPARENT);
dc.drawText(left, lineY, nameFont, Ui.fit(dc, "Damaged " + id, nameFont, right - left), Graphics.TEXT_JUSTIFY_LEFT);
return true;
}
@@ -297,12 +299,12 @@ class ListView extends WatchUi.View {
var secondRight = right;
var complete = true;
var iconSize = nameH * 2 / 3;
- if (header.kind == Entry.KIND_CODE) {
- Ui.drawBarcode(dc, right - iconSize, lineY + (nameH - iconSize) / 2, iconSize, Ui.dim());
- nameRight -= iconSize + 6;
- } else if (header.locked) {
+ if (header.locked) {
Ui.drawLock(dc, right - iconSize, lineY + (nameH - iconSize) / 2, iconSize, Ui.dim());
nameRight -= iconSize + 6;
+ } else if (header.kind == Entry.KIND_CODE) {
+ Ui.drawBarcode(dc, right - iconSize, lineY + (nameH - iconSize) / 2, iconSize, Ui.dim());
+ nameRight -= iconSize + 6;
} else {
var now = AppState.now();
var text = AppState.cryptoReady ? AppState.theCodes().cached(header.id, now) : null;