MCPcopy Create free account
hub / github.com/dailydotdev/apps / waitForStill

Function waitForStill

packages/shared/src/features/boost/BoostManager.tsx:520–531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

518 let stillFrames = 0;
519 let hasMoved = false;
520 const waitForStill = () => {
521 const isStill = window.scrollY === lastY;
522 hasMoved = hasMoved || !isStill;
523 stillFrames = isStill ? stillFrames + 1 : 0;
524 lastY = window.scrollY;
525 if (stillFrames >= (hasMoved ? 6 : 20)) {
526 clearTimeout(timeoutRef.current);
527 blink();
528 return;
529 }
530 frameRef.current = requestAnimationFrame(waitForStill);
531 };
532 frameRef.current = requestAnimationFrame(waitForStill);
533 timeoutRef.current = setTimeout(blink, 1500);
534 });

Callers

nothing calls this directly

Calls 1

blinkFunction · 0.85

Tested by

no test coverage detected