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

Function actionLoop

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

Source from the content-addressed store, hash-verified

141 }, between(BLINK_EVERY_MS));
142 };
143 const actionLoop = () => {
144 later(() => {
145 if (!isBusy && !prefersReducedMotion) {
146 play(
147 pickPatchyIdleAction(Math.random(), {
148 isReading: readingRef.current,
149 isEvening: new Date().getHours() >= 21,
150 }),
151 );
152 }
153 actionLoop();
154 }, between(ACTION_EVERY_MS));
155 };
156 blinkLoop();
157 actionLoop();
158

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