diff options
| author | Adam Soltys <[email protected]> | 2026-10-17 05:04:35 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-17 05:04:35 -0700 |
| commit | e529ab104a19ceb71f1981016fb3a857a79d3caa (patch) | |
| tree | 75ca0f7646fe7894a0bb547c58d7669001c65f58 /src/features | |
| parent | 1b5c254ec50176f20dceef6f015d1a2731a4904e (diff) | |
| download | coinosv3-e529ab104a19ceb71f1981016fb3a857a79d3caa.tar.gz coinosv3-e529ab104a19ceb71f1981016fb3a857a79d3caa.zip | |
The video pager's counter counts every post it has found, not just the clips already warmed up: a refresh no longer shows "1 / 2" over a grid of a dozen.
The posts were all there (the grid showed them); the carousel holds a post back until its clip is ready to play — its first frame on the slide and its opening cached — and only the next couple are warmed at a time, so after a refresh the total started at 1 or 2 and crept up as clips warmed (Adam, 2026-10-17: "On refresh the total video count seems to reset to 1 and slowly more load despite showing posters for several more being available"). Now the total, and the place in it, count the waiting posts too; only posts kept out for their shape are left out. A swipe still passes over a post not yet ready.
tools/pager-ready-gate-test.js: the counter reads 3 / 4 both before and after the waiting post joins. pager-swipe-fly, profile-pager, thread-pager and pager-seek-hide pass.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013ZDf1cyCQLkfjftYhymZAg
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/messages.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index 017629f..82b1986 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -13194,9 +13194,14 @@ export function messagesFeature(ctx) { const slide = rowSlide(group); if (slide) { pagerShow(slide); pagerArrive(slide); } } + // Counted: every post the pager has found, the ones still waiting for + // their clip to be ready included — only those kept out for their shape + // aren't. Counting the carousel alone, a refresh showed "1 / 2" over a + // grid of a dozen clips, the total creeping up as clips warmed (Adam, + // 2026-10-17: "the total count persists"). function pagerPosition() { if (!pager) return; - const groups = pagerGroups(); + const groups = pagerGroups(true).filter((g) => !g.classList.contains('mp-off')); const slide = pager.cur || pager.anchor; const index = groups.indexOf(slide && slide.closest('.mp-group')); pager.el.querySelector('.mp-position').textContent = (index < 0 ? 0 : index + 1) + ' / ' + groups.length; |
