aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-30 09:05:19 -0700
committerAdam Soltys <[email protected]>2026-09-30 09:05:19 -0700
commite96c445e73d26e946cf2a3d515b5f0ab697ef5f0 (patch)
tree2486a5fcefda9b5bc0efa02c8032b957ee46412b /src
parenta3a1b4f44fe45f190c2c698fcd262788bdc93f40 (diff)
downloadcoinosv3-e96c445e73d26e946cf2a3d515b5f0ab697ef5f0.tar.gz
coinosv3-e96c445e73d26e946cf2a3d515b5f0ab697ef5f0.zip
From someone's timeline, ‹ goes back to their profile and the Feed tab is your own feed again.
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01Du1qT1wbkYwYK6zkGH79Rp
Diffstat (limited to 'src')
-rw-r--r--src/features/messages.js12
1 files changed, 10 insertions, 2 deletions
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'), '<path d="M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.4 8.4 0 0 1 3.8-.9h.5a8.5 8.5 0 0 1 8 8z"/>', () => {
@@ -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();
}),