diff options
Diffstat (limited to 'source/ui/ListView.mc')
| -rw-r--r-- | source/ui/ListView.mc | 18 |
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; |
