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

Function waitForStill

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

Source from the content-addressed store, hash-verified

526 let stillFrames = 0;
527 let hasMoved = false;
528 const waitForStill = () => {
529 const isStill = window.scrollY === lastY;
530 hasMoved = hasMoved || !isStill;
531 stillFrames = isStill ? stillFrames + 1 : 0;
532 lastY = window.scrollY;
533 if (stillFrames >= (hasMoved ? 6 : 20)) {
534 clearTimeout(timeoutRef.current);
535 blink();
536 return;
537 }
538 frameRef.current = requestAnimationFrame(waitForStill);
539 };
540 frameRef.current = requestAnimationFrame(waitForStill);
541 timeoutRef.current = setTimeout(blink, 1500);
542 });

Callers

nothing calls this directly

Calls 1

blinkFunction · 0.85

Tested by

no test coverage detected