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

Function actionLoop

packages/shared/src/features/patchy/patchyIdle.ts:151–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149 }, between(BLINK_EVERY_MS));
150 };
151 const actionLoop = () => {
152 later(() => {
153 if (!isBusy && !prefersReducedMotion) {
154 play(
155 pickPatchyIdleAction(Math.random(), {
156 isReading: readingRef.current,
157 isEvening: new Date().getHours() >= 21,
158 }),
159 );
160 }
161 actionLoop();
162 }, between(ACTION_EVERY_MS));
163 };
164 if (canBlink) {
165 blinkLoop();
166 }

Callers 1

usePatchyIdleFunction · 0.85

Calls 4

laterFunction · 0.85
pickPatchyIdleActionFunction · 0.85
playFunction · 0.70
betweenFunction · 0.70

Tested by

no test coverage detected