···1515import {networkRetry} from '#/lib/async/retry'
1616import {PUBLIC_BSKY_SERVICE} from '#/lib/constants'
1717import {getAge} from '#/lib/strings/time'
1818-import {snoozeBirthdateUpdateAllowedForDid} from '#/state/birthdate'
1818+import {
1919+ hasSnoozedBirthdateUpdateForDid,
2020+ snoozeBirthdateUpdateAllowedForDid,
2121+} from '#/state/birthdate'
1922import {useAgent, useSession} from '#/state/session'
2023import * as debug from '#/ageAssurance/debug'
2124import {logger} from '#/ageAssurance/logger'
···331334 }
332335333336 /**
334334- * If the user is under the minimum age, and the birthdate is not due to
335335- * the legacy bug, snooze further birthdate updates for this user.
337337+ * If the user is under the minimum age, and the birthdate is not due to the
338338+ * legacy bug, AND we've not already snoozed their birthdate update, snooze
339339+ * further birthdate updates for this user.
340340+ *
341341+ * This is basically a migration step for this initial rollout.
336342 */
337337- if (data.birthdate && !isLegacyBirthdateBug(data.birthdate)) {
343343+ if (
344344+ data.birthdate &&
345345+ !isLegacyBirthdateBug(data.birthdate) &&
346346+ !hasSnoozedBirthdateUpdateForDid(did!)
347347+ ) {
338348 snoozeBirthdateUpdateAllowedForDid(did!)
339349 }
340350
+9
src/state/birthdate.ts
···2121}
22222323/**
2424+ * Checks if we've already snoozed bday updates. In some cases, if one is
2525+ * present, we don't need to set another, such as in AA when reading initial
2626+ * data on load.
2727+ */
2828+export function hasSnoozedBirthdateUpdateForDid(did: string) {
2929+ return !!account.get([did, 'birthdateLastUpdatedAt'])
3030+}
3131+3232+/**
2433 * Returns whether a birthdate update is currently allowed, based on the
2534 * last update timestamp stored locally.
2635 */