about summary refs log tree commit diff
path: root/src/state/events.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/events.ts')
-rw-r--r--src/state/events.ts8
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)
+}