Update feeds on post created (#2085)
This commit is contained in:
parent
bdb2bfdd83
commit
48f5cebc80
4 changed files with 66 additions and 14 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
>({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue