diff options
| author | dan <dan.abramov@gmail.com> | 2023-12-06 20:04:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-06 12:04:05 -0800 |
| commit | 6335be14e17c7bf1a36e9103148277717e3a7a90 (patch) | |
| tree | c10f139dc2507a38bb3c58819cc19382279a675f /src/state/events.ts | |
| parent | 748212e000f963976bca5d63e0961d75a7e8b296 (diff) | |
| download | voidsky-6335be14e17c7bf1a36e9103148277717e3a7a90.tar.zst | |
Move analytics out of init (#2115)
* Remove listenSessionLoaded from analytics * Move analytics init call to navigation ready * Remove zod dependency from analytics * Mirror changes on the web * Delete listenSessionLoaded * Only set up listeners once
Diffstat (limited to 'src/state/events.ts')
| -rw-r--r-- | src/state/events.ts | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/state/events.ts b/src/state/events.ts index f85860823..1384abded 100644 --- a/src/state/events.ts +++ b/src/state/events.ts @@ -1,6 +1,4 @@ import EventEmitter from 'eventemitter3' -import {BskyAgent} from '@atproto/api' -import {SessionAccount} from './session' type UnlistenFn = () => void @@ -16,19 +14,6 @@ export function listenSoftReset(fn: () => void): UnlistenFn { return () => emitter.off('soft-reset', fn) } -export function emitSessionLoaded( - sessionAccount: SessionAccount, - agent: BskyAgent, -) { - emitter.emit('session-loaded', sessionAccount, agent) -} -export function listenSessionLoaded( - fn: (sessionAccount: SessionAccount, agent: BskyAgent) => void, -): UnlistenFn { - emitter.on('session-loaded', fn) - return () => emitter.off('session-loaded', fn) -} - export function emitSessionDropped() { emitter.emit('session-dropped') } |
