From 928da70638fceb622d5e83ed0792817e1bcd908e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 14 Oct 2026 00:34:46 +0000 Subject: Closing the pager (or a picture) lands on the page under it, not wherever Back goes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The × was a blind history.back(), and the entry under the pager isn't always the feed: the browser's older entries outlive a background reload of the app, and boot merges entries. It took the reader to the wallet, then the chat list. closeLayer still steps Back (so the phone's Back doesn't reopen it), but if Back lands anywhere but the page under the layer, the reader is put on that page and that entry rewritten to it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01KPw21NEpWeTGu6swVASmBt --- src/features/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index 16ae3a2..8f5adcb 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -12040,7 +12040,7 @@ export function messagesFeature(ctx) { ui.mediaPager = { kind, start, feed: curFeedId, fromFeed, at }; render(); } - const closeMediaPager = () => ctx.goBack(() => { ui.mediaPager = null; }); + const closeMediaPager = () => ctx.closeLayer('mediaPager'); // still on the picture that opened the pager (nothing swiped to yet) const pagerOnStart = () => !pager || !pager.cur || pager.cur.getAttribute('data-k') === pager.start; // Dismissing a pager opened from the feed after moving through it lands -- cgit v1.2.3