From e96c445e73d26e946cf2a3d515b5f0ab697ef5f0 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 30 Sep 2026 09:05:19 -0700 Subject: From someone's timeline, ‹ goes back to their profile and the Feed tab is your own feed again. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Feed tab reopened whichever feed was last on — the session timeline — and ‹ on it went to the chat list, so there was no way back to your own feed. The tab now opens the last of your own feeds; ‹ on a feed opened from somewhere (a timeline, a #tag, a pack link) steps back in history. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Du1qT1wbkYwYK6zkGH79Rp --- src/features/messages.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/features/messages.js b/src/features/messages.js index 3d9b1e9..b14cb75 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -3899,6 +3899,8 @@ export function messagesFeature(ctx) { const FEED_LS = 'btc-wallet-feed'; // the feed last on screen, remembered per device const feedStates = new Map(); // id -> state const adhocFeeds = new Map(); // id -> definition, this session only + // the feed of your own you last had on (never a session one) + const homeFeedId = () => { let id = FOLLOWING; try { id = localStorage.getItem(FEED_LS) || FOLLOWING; } catch {} return feedDef(id) && !adhocFeeds.has(id) ? id : FOLLOWING; }; let curFeedId = (() => { try { return localStorage.getItem(FEED_LS) || FOLLOWING; } catch { return FOLLOWING; } })(); // Two feeds everyone has: the people you follow, and everything the coinos // relay carries. Each remembers its own relay choice in the state. @@ -7993,9 +7995,12 @@ export function messagesFeature(ctx) { // A destination tab is a destination: tapping Feed while already // there always returns to its top. Only the explicit "x new posts" // pill jumps to the first unread arrival. - if (active === 'feed' && ui.msgView === 'feed' && !ui.profilePk && !ui.noteThread && !ui.feedEdit) { glideToTop(); return; } + // (someone's timeline or a #tag opened from a post isn't the Feed + // tab — the tab is your own feeds, the one you last had on) + const own = adhocFeeds.has(curFeedId) ? homeFeedId() : curFeedId; + if (active === 'feed' && ui.msgView === 'feed' && !ui.profilePk && !ui.noteThread && !ui.feedEdit && own === curFeedId) { glideToTop(); return; } leavePage(); - if (visitor) { ui.pubProf = true; openFirehose(); } else showFeed(curFeedId); + if (visitor) { ui.pubProf = true; openFirehose(); } else showFeed(own); window.scrollTo({ top: 0 }); }), button('messages', t('msgDmsTitle'), '', () => { @@ -8060,6 +8065,9 @@ export function messagesFeature(ctx) { h('div', { class: 'row gap6', style: 'align-items:center' }, backBtn(() => { stopFeedWatch(); + // a feed opened from somewhere (a profile's timeline, a #tag, a + // pack link) goes back there — or, reached directly, to yours + if (!visitor && adhocFeeds.has(def.id)) { ctx.goBack(() => { ui.chatOpen = true; ui.msgView = 'feed'; selectFeed(homeFeedId()); }); return; } if (visitor) { ui.chatOpen = false; ui.msgView = null; ui.pubProf = null; } else ui.msgView = 'home'; render(); }), -- cgit v1.2.3