aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
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 4a154c8..7e92374 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -12763,7 +12763,10 @@ export function messagesFeature(ctx) {
// fling would have coasted — the speed times FLY_TAU, in screens — from
// FLY_V up; a slower swipe is the one post it was. The ends are not
// flown past: a fling that would, lands on the last (or first) post.
- const FLY_V = 3, FLY_TAU = 500, FLY_MAX = 6; // px/ms; ms; posts
+ // (3 px/ms and a 500 ms coast took a hard flick to fly at all — Adam,
+ // 2026-10-16: "too hard to get it to fly".)
+ const FLY_V = 1.6, FLY_TAU = 800, FLY_MAX = 6; // px/ms; ms; posts
+ const TRACK_MS = 80; // the speed is the finger's over its last moment, not its last few samples
let touch = null, pendingTap = 0, tapDoneAt = 0;
el.addEventListener('touchstart', (e) => {
const t = e.touches[0];
@@ -12791,7 +12794,7 @@ export function messagesFeature(ctx) {
d.far = Math.max(d.far || 0, Math.hypot(dx, dy));
if (d.axis === 'y') d.box.scrollTop = d.start - delta; else d.box.scrollLeft = d.start - delta;
d.track.push({ t: performance.now(), v: delta }); // (when handled: synthetic moves can share a timeStamp)
- if (d.track.length > 5) d.track.shift();
+ while (d.track.length > 2 && d.track[d.track.length - 1].t - d.track[1].t >= TRACK_MS) d.track.shift();
}, { passive: false });
// let go of a drag: on to the next (or the one before), or back
function settle(d, step, vel = 0) {