From 4579d926564697289e3e69973ccea4148b13fc40 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 3 Oct 2026 22:03:08 -0700 Subject: Media pager: a button opens the post itself (count of replies on it) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011bvzKaZosXGHkigcGcSzAR --- src/features/messages.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index 8f6eb2d..9c4b50f 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -9968,6 +9968,8 @@ export function messagesFeature(ctx) { like.querySelector('.i').innerHTML = I_HEART(!!myReactOn(ev.id)); like.querySelector('.n').textContent = s.likes ? String(s.likes) : ''; zap.classList.toggle('on', sats > 0); + const replies = replyCount(ev.id); + slide.querySelector('.mp-post .n').textContent = replies ? String(replies) : ''; zap.querySelector('.n').textContent = sats ? fmtSats(sats) : ''; } function pagerSlide(it) { @@ -9992,6 +9994,10 @@ export function messagesFeature(ctx) { (myReactOn(ev.id) ? unreact(ev) : reactTo(ev, '❤️')).catch(() => {}).finally(() => pagerCounts(slide)); setTimeout(() => pagerCounts(slide), 50); }) }, h('span', { class: 'i', html: I_HEART(false) }), h('span', { class: 'n' })), + // the post itself, as the feed would open it: the whole text, the replies + h('button', { class: 'mp-post', type: 'button', 'aria-label': t('mediaOpenPost'), title: t('mediaOpenPost'), onClick: stop(() => { + leavePager(); openNoteThread(ev); + }) }, h('span', { class: 'i', html: I_REPLY }), h('span', { class: 'n' })), h('button', { class: 'mp-zap', type: 'button', 'aria-label': t('zapTitle'), onClick: stop((e) => { if (signinAsk()) { leavePager(); render(); return; } // the first zap ever asks for an amount on a page of its own -- cgit v1.2.3