From 12ecbf2bcdd59b6c3a2714c69240cb3be65b7e3e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 28 Aug 2026 19:27:40 -0700 Subject: A detail page doesn't survive changing accounts: switching Spending↔Savings with a payment record open closes it and lands on Receive — the record belonged to the other side MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi --- src/app.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 4792f57..310e724 100644 --- a/src/app.js +++ b/src/app.js @@ -3164,6 +3164,12 @@ function setAccountSel(a, dir) { _accDir = dir || (a === 'savings' ? 'left' : 'right'); ui.account = a; try { localStorage.setItem(ACCOUNT_KEY, a); } catch {} + // A payment's detail page belongs to the account it was opened from — + // switching accounts closes it and lands on Receive. + if (ui.txDetail || ui.arkMoveDetail || ui.arkExitDetail || ui.giftDetail) { + ui.txDetail = null; ui.arkMoveDetail = null; ui.arkExitDetail = null; ui.giftDetail = null; + ui.tab = 'receive'; + } render(); } -- cgit v1.2.3