An ATproto social media client -- with an independent Appview.
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Only prompt users once to verify email (according to local storage) close #1657 (#1658)

authored by

Paul Frazee and committed by
GitHub
bc2c44cb 098f4b52

+6 -6
+6 -6
src/state/models/ui/reminders.ts
··· 3 3 import {RootStoreModel} from '../root-store' 4 4 import {toHashCode} from 'lib/strings/helpers' 5 5 6 - const DAY = 60e3 * 24 * 1 // 1 day (ms) 7 - 8 6 export class Reminders { 9 - lastEmailConfirm: Date = new Date() 7 + lastEmailConfirm: Date | null = null 10 8 11 9 constructor(public rootStore: RootStoreModel) { 12 10 makeAutoObservable( ··· 45 43 if (this.rootStore.onboarding.isActive) { 46 44 return false 47 45 } 46 + // only prompt once 47 + if (this.lastEmailConfirm) { 48 + return false 49 + } 48 50 const today = new Date() 49 51 // shard the users into 2 day of the week buckets 50 52 // (this is to avoid a sudden influx of email updates when ··· 53 55 if (code !== today.getDay() && code !== (today.getDay() + 1) % 7) { 54 56 return false 55 57 } 56 - // only ask once a day at most, but because of the bucketing 57 - // this will be more like weekly 58 - return Number(today) - Number(this.lastEmailConfirm) > DAY 58 + return true 59 59 } 60 60 61 61 setEmailConfirmationRequested() {