diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-15 17:17:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 17:17:50 -0800 |
commit | 6616b2bff098ff4a5e464c175edf2446dae0cc88 (patch) | |
tree | fb314b51dd3d17b488fa2971735aa7c19176493b /src/state/models/ui/shell.ts | |
parent | f23e9978d839322aab7304d2b6f183722e3ad4c1 (diff) | |
download | voidsky-6616b2bff098ff4a5e464c175edf2446dae0cc88.tar.zst |
Shell behaviors update (react-query refactor) (#1915)
* Move tick-every-minute into a hook/context * Move soft-reset event out of the shell model * Update soft-reset listener on new search page * Implement session-loaded and session-dropped events * Update analytics and push-notifications to use new session system
Diffstat (limited to 'src/state/models/ui/shell.ts')
-rw-r--r-- | src/state/models/ui/shell.ts | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/state/models/ui/shell.ts b/src/state/models/ui/shell.ts index 310d4f0f9..223c20625 100644 --- a/src/state/models/ui/shell.ts +++ b/src/state/models/ui/shell.ts @@ -1,6 +1,6 @@ import {AppBskyActorDefs} from '@atproto/api' import {RootStoreModel} from '../root-store' -import {makeAutoObservable, runInAction} from 'mobx' +import {makeAutoObservable} from 'mobx' import { shouldRequestEmailConfirmation, setEmailConfirmationRequested, @@ -40,14 +40,12 @@ export class ImagesLightbox implements LightboxModel { export class ShellUiModel { isLightboxActive = false activeLightbox: ProfileImageLightbox | ImagesLightbox | null = null - tickEveryMinute = Date.now() constructor(public rootStore: RootStoreModel) { makeAutoObservable(this, { rootStore: false, }) - this.setupClock() this.setupLoginModals() } @@ -83,14 +81,6 @@ export class ShellUiModel { this.activeLightbox = null } - setupClock() { - setInterval(() => { - runInAction(() => { - this.tickEveryMinute = Date.now() - }) - }, 60_000) - } - setupLoginModals() { this.rootStore.onSessionReady(() => { if (shouldRequestEmailConfirmation(this.rootStore.session)) { |