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

Function waitForStill

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

Source from the content-addressed store, hash-verified

533 let stillFrames = 0;
534 let hasMoved = false;
535 const waitForStill = () => {
536 const isStill = window.scrollY === lastY;
537 hasMoved = hasMoved || !isStill;
538 stillFrames = isStill ? stillFrames + 1 : 0;
539 lastY = window.scrollY;
540 if (stillFrames >= (hasMoved ? 6 : 20)) {
541 clearTimeout(timeoutRef.current);
542 blink();
543 return;
544 }
545 frameRef.current = requestAnimationFrame(waitForStill);
546 };
547 frameRef.current = requestAnimationFrame(waitForStill);
548 timeoutRef.current = setTimeout(blink, 1500);
549 });

Callers

nothing calls this directly

Calls 1

blinkFunction · 0.85

Tested by

no test coverage detected