aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-03 21:49:07 -0700
committerAdam Soltys <[email protected]>2026-09-03 21:49:07 -0700
commit86fb1018bd11c2ba7e333007748fb076c046bce3 (patch)
tree1c8097cd81f8ee9e945e351872f25ea9dc483242 /src/app.js
parent6bfe57611b792ff3162de2e9e1a4e97240af8133 (diff)
downloadcoinosv3-86fb1018bd11c2ba7e333007748fb076c046bce3.tar.gz
coinosv3-86fb1018bd11c2ba7e333007748fb076c046bce3.zip
The real 'false start': the auto-select-Spending one-shot yanking the card back. On open, when Savings is empty and Ark has a balance, the wallet flips you to Spending — a convenience. But it fires on every Ark update and only latches once the balance SYNCS, which after a refresh arrives a second late — right after you've dragged to Savings, so it overrides your choice and slides back. Now any deliberate pick (carousel scroll/tap/flick, swipe, accounts screen) sets accountUserChosen, and the auto-select consumes its one-shot without flipping when you've already chosen
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
index 82cf537..d13dda7 100644
--- a/src/app.js
+++ b/src/app.js
@@ -3239,6 +3239,7 @@ function viewLabel(a, view) {
return view === 'spending' ? t('spendingName') : t('savingsName');
}
function switchToView(id, view) {
+ ui.accountUserChosen = true; // deliberate pick from the accounts screen
ui.account = view;
try { localStorage.setItem(ACCOUNT_KEY, view); } catch {}
if (id === activeId) { ui.screen = 'wallet'; ui.tab = 'history'; render(); }
@@ -3263,6 +3264,7 @@ let _accDir = null; // which way the balance face should slide in
let _accAnim = false; // whether the current face switch animates (decided at the switch)
function setAccountSel(a, dir) {
if (ui.account === a) return;
+ ui.accountUserChosen = true; // deliberate pick — auto-select must not override
_accDir = dir || (a === 'savings' ? 'left' : 'right');
ui.account = a;
try { localStorage.setItem(ACCOUNT_KEY, a); } catch {}
@@ -3419,6 +3421,7 @@ function balanceCard() {
// the scroll already rests on this card — mark it aligned so the
// post-render pass skips its layout read instead of re-aligning
el._alignedTo = view;
+ ui.accountUserChosen = true; // a deliberate pick — no auto-select behind it
ui.account = view;
try { localStorage.setItem(ACCOUNT_KEY, view); } catch {}
// selecting an account lands on its history (home), any open
@@ -3534,6 +3537,7 @@ function balanceCard() {
if (e.target.closest && e.target.closest('button, a, input')) return;
const strip = e.currentTarget.parentNode;
if (strip && Date.now() - (strip._dragged || 0) < 300) return;
+ ui.accountUserChosen = true; // deliberate pick
ui.account = v;
try { localStorage.setItem(ACCOUNT_KEY, v); } catch {}
ui.txDetail = null; ui.arkMoveDetail = null; ui.arkReconDetail = null; ui.arkExitDetail = null; ui.giftDetail = null;