Resolves once the dismissal has been persisted.
await snoozeReviewPrompt(); // dismissCount 0 -> 1, sets snoozedUntil
export async function snoozeReviewPrompt(): Promise<void> {
const state = await getReviewPromptState();
const dismissCount = state.dismissCount + 1;
await cstorage.local.set({
[CACHE.REVIEW_PROMPT]: {
...state,
dismissCount,
snoozedUntil: dismissCount === 1 ? Date.now() + REVIEW_SNOOZE_MS : state.snoozedUntil,
},
});
}
Records a dismissal. The first ✕ snoozes the prompt for REVIEW_SNOOZE_MS so it can show one final time; any later dismissal just advances the counter, which silences it for good.