Bluesky app fork with some witchin' additions 💫 forked from jollywhoppers.com/witchsky.app
Something went wrong. Try again.
539 B · 22 lines
TypeScript
1234567891011121314151617181920212223import {simpleAreDatesEqual} from '#/lib/strings/time'import {device} from '#/storage'
export function snooze() { device.set(['lastNuxDialog'], new Date().toISOString())}
export function unsnooze() { device.set(['lastNuxDialog'], undefined)}
export function isSnoozed() { const lastNuxDialog = device.get(['lastNuxDialog']) if (!lastNuxDialog) return false const last = new Date(lastNuxDialog) const now = new Date() // already snoozed today if (simpleAreDatesEqual(last, now)) { return true } return false}