From 21a0b57935d81480c009eb83fd829b94b8fd1ade Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 4 Sep 2026 15:17:31 -0700 Subject: Flip the swipe ring's tab order per feedback: … page0 ⇄ page1 … lastPage ⇄ Receive ⇄ Send ⇄ page0 … Left from the last history page now wraps into Receive then Send (matching the tab bar's visual order and the pre-ring muscle memory of left-from-history landing on Receive); right from page 1 gives Send, then Receive, then the last page. Verified headless: right×3 walks history → Send → Receive → history(last), left×3 walks it back 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_01MGzU12QrAA4G6BYGzGVdXz --- src/app.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index d78793d..dff963a 100644 --- a/src/app.js +++ b/src/app.js @@ -4909,11 +4909,11 @@ applyDir(); return; } // The swipe surfaces form ONE RING that loops: - // … page0 ⇄ page1 … lastPage ⇄ Send ⇄ Receive ⇄ page0 … + // … page0 ⇄ page1 … lastPage ⇄ Receive ⇄ Send ⇄ page0 … // Swiping left over the history list turns pages older (the pager's - // Next); at the last page it wraps into Send, then Receive, then back to - // page 0. Swiping right from page 0 goes the other way — Receive, then - // Send, then the LAST page. No dead ends anywhere. + // Next); at the last page it wraps into Receive, then Send, then back to + // page 0. Swiping right from page 0 goes the other way — Send, then + // Receive, then the LAST page. No dead ends anywhere. const resets = () => { // same resets as a tab-bar tap ui.sendError = ''; @@ -4934,13 +4934,13 @@ applyDir(); // a detail view / spinner / empty list publishes no pager — treat it // as a single page so the swipe still reaches the tabs const { page, pages } = _histPager || { page: 0, pages: 1 }; - if (dx < 0) { if (page < pages - 1) { ui.txPage = page + 1; render(); } else goTab('send'); } + if (dx < 0) { if (page < pages - 1) { ui.txPage = page + 1; render(); } else goTab('receive'); } else if (page > 0) { ui.txPage = page - 1; render(); } - else goTab('receive'); + else goTab('send'); return; } - if (ui.tab === 'receive') { if (dx < 0) goHist(0); else goTab('send'); return; } - if (ui.tab === 'send') { if (dx < 0) goTab('receive'); else goHist(1e9); return; } + if (ui.tab === 'receive') { if (dx < 0) goTab('send'); else goHist(1e9); return; } + if (ui.tab === 'send') { if (dx < 0) goHist(0); else goTab('receive'); return; } }, { passive: true }); })(); -- cgit v1.2.3