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

Function writeStreakViewQueue

packages/shared/src/lib/streakViewQueue.ts:40–50  ·  view source on GitHub ↗
(queue: QueuedStreakView[])

Source from the content-addressed store, hash-verified

38};
39
40const writeStreakViewQueue = (queue: QueuedStreakView[]): void => {
41 try {
42 if (queue.length) {
43 storageWrapper.setItem(STREAK_VIEW_QUEUE_KEY, JSON.stringify(queue));
44 } else {
45 storageWrapper.removeItem(STREAK_VIEW_QUEUE_KEY);
46 }
47 } catch {
48 // ignore storage quota / privacy-mode failures
49 }
50};
51
52const isSameView = (a: QueuedStreakView, b: Pick<QueuedStreakView, 'postId'>) =>
53 a.postId === b.postId;

Callers 2

enqueueStreakViewFunction · 0.85
removeStreakViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected