aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-01 08:47:48 -0700
committerAdam Soltys <[email protected]>2026-10-01 08:47:48 -0700
commitdaa7b0c58e359da18cb705162a57492da5e52248 (patch)
treeb72a9a4a19da26ae49b5bce91b74894003b8ba58 /src/features
parent5d441ebbce6066c3636168ec5332ae9c2bdb8607 (diff)
downloadcoinosv3-daa7b0c58e359da18cb705162a57492da5e52248.tar.gz
coinosv3-daa7b0c58e359da18cb705162a57492da5e52248.zip
The Back button under a post returns to the feed where the reader left it, not its top.
It now walks history like the system Back (whose popstate restores the scroll place); the profile page's Back does the same. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VP5Ljqk7EYcm5QQAbzDwog
Diffstat (limited to 'src/features')
-rw-r--r--src/features/messages.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index b696267..73d4c03 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -7445,7 +7445,10 @@ export function messagesFeature(ctx) {
// the public no-wallet surface drops the action row)
ctx.brandHeader(!ui.pubProf && wallet.loaded),
h('div', { class: 'card col thread-card', style: 'gap:0;padding:2px 14px' }, ...kids),
- h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.noteThread = null; render(); } }, t('back')),
+ // a real Back: the history entry under the thread restores the feed
+ // (or profile) and its scroll place; ui-only only when the thread was
+ // opened straight from a link and there is nothing under it
+ h('button', { class: 'btn-ghost btn-block', onClick: () => ctx.goBack(() => { ui.noteThread = null; }) }, t('back')),
...noteOverlays());
}
@@ -7911,7 +7914,7 @@ export function messagesFeature(ctx) {
h('span', { class: 'spinner sm' }))
: null);
})(),
- h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.profilePk = null; ui.profOverThread = false; ui.pubProf = null; ui.profEdit = null; ui.profEditFilled = false; ui.profCompose = null; render(); } }, t('back')),
+ h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.profCompose = null; ctx.goBack(() => { ui.profilePk = null; ui.profOverThread = false; ui.pubProf = null; ui.profEdit = null; ui.profEditFilled = false; }); } }, t('back')),
mine ? logoutPop() : null,
mine ? switchPop() : null,
...noteOverlays());