diff options
Diffstat (limited to 'src/state')
-rw-r--r-- | src/state/events.ts | 8 | ||||
-rw-r--r-- | src/state/queries/post-feed.ts | 2 |
2 files changed, 9 insertions, 1 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) +} diff --git a/src/state/queries/post-feed.ts b/src/state/queries/post-feed.ts index 7589aa346..36e06cfab 100644 --- a/src/state/queries/post-feed.ts +++ b/src/state/queries/post-feed.ts @@ -248,7 +248,7 @@ export function findPostInQueryData( export function* findAllPostsInQueryData( queryClient: QueryClient, uri: string, -): Generator<AppBskyFeedDefs.PostView, void> { +): Generator<AppBskyFeedDefs.PostView, undefined> { const queryDatas = queryClient.getQueriesData< InfiniteData<FeedPageUnselected> >({ |