diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-12-04 17:58:45 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 17:58:45 -0800 |
commit | 48f5cebc80975388f83ba61c3d6c7b620124969d (patch) | |
tree | 850ad8ca738d4fc19486e0694545e0108d9d0293 /src/state/events.ts | |
parent | bdb2bfdd836c473d1133f19c9667f77e458824c6 (diff) | |
download | voidsky-48f5cebc80975388f83ba61c3d6c7b620124969d.tar.zst |
Update feeds on post created (#2085)
Diffstat (limited to 'src/state/events.ts')
-rw-r--r-- | src/state/events.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/state/events.ts b/src/state/events.ts index 5441aafef..f85860823 100644 --- a/src/state/events.ts +++ b/src/state/events.ts @@ -36,3 +36,11 @@ export function listenSessionDropped(fn: () => void): UnlistenFn { emitter.on('session-dropped', fn) return () => emitter.off('session-dropped', fn) } + +export function emitPostCreated() { + emitter.emit('post-created') +} +export function listenPostCreated(fn: () => void): UnlistenFn { + emitter.on('post-created', fn) + return () => emitter.off('post-created', fn) +} |