aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/features/messages.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index cf6e2c7..654b6d5 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -13139,6 +13139,13 @@ export function messagesFeature(ctx) {
// it is passing and steps back from there; a touch or a key catches it
// too (pagerHold → onDone). A notch from rest is the single step it was.
let fly = null; // { to: the post flown to, n: notches in this run, at, dir }
+ // A video pager flies only once ten clips are ready to play (in the
+ // carousel): before that a fling outran the warming, landing on whatever
+ // was ready and fighting the clips joining (Adam, 2026-10-17: "let's not
+ // allow flying/coasting until we have at least 10 videos fully warmed
+ // up"). Until then a flick or a spin of the wheel is one post at a time.
+ const PAGER_FLY_READY = 10;
+ const pagerCanFly = () => !pager || pager.kind !== 'videos' || frugalData() || pagerGroups().length >= PAGER_FLY_READY;
function pagerFly(dir, now) {
if (!pager) return;
const stops = pagerGroups();
@@ -13153,7 +13160,7 @@ export function messagesFeature(ctx) {
const here = pagerHere();
from = here && here.closest('.mp-group');
}
- const next = stops.indexOf(from) + dir * (n <= 2 ? 1 : 2);
+ const next = stops.indexOf(from) + dir * (n <= 2 || !pagerCanFly() ? 1 : 2);
const i = (next % stops.length + stops.length) % stops.length;
if (next < 0 || next >= stops.length) { fly = null; pagerWrap(stops[i]); return; }
const to = stops[i];
@@ -13339,7 +13346,7 @@ export function messagesFeature(ctx) {
if (!stops.length) return;
// the stop it set off from, then one along (or back) — or, flung, several
const from = stops.reduce((bi, p, i) => (Math.abs(p - d.start) < Math.abs(stops[bi] - d.start) ? i : bi), 0);
- const posts = y && step && Math.abs(vel) >= FLY_V ? Math.min(FLY_MAX, Math.max(1, Math.round(Math.abs(vel) * FLY_TAU / Math.max(1, box.clientHeight)))) : 1;
+ const posts = y && step && Math.abs(vel) >= FLY_V && pagerCanFly() ? Math.min(FLY_MAX, Math.max(1, Math.round(Math.abs(vel) * FLY_TAU / Math.max(1, box.clientHeight)))) : 1;
const next = from + step * posts;
// Past either end, round to the other: the first post (going up, the
// last) — a step, or a fling whose coast is mostly beyond the end. A