about summary refs log tree commit diff
path: root/src/state/queries/notifications/feed.ts
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-02-20 19:41:29 +0000
committerGitHub <noreply@github.com>2024-02-20 19:41:29 +0000
commit3a7585567792dfeff2c125bbc5372cc4fd1ab77b (patch)
tree3f2c10569c3025c3088c3b8cb4a9fef17e6162f2 /src/state/queries/notifications/feed.ts
parentfab6c286f46e9e491dfeed76291adeae6832d8ef (diff)
downloadvoidsky-3a7585567792dfeff2c125bbc5372cc4fd1ab77b.tar.zst
Prefer full posts for post thread placeholder (#2943)
* Revert "Prefer post over quote when finding cached post (#2935)"

This reverts commit da62a77f05258ce2b0609248cb5677c2406a4e63.

* Prefer full posts for post thread placeholder

* Clarify with a comment
Diffstat (limited to 'src/state/queries/notifications/feed.ts')
-rw-r--r--src/state/queries/notifications/feed.ts17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/state/queries/notifications/feed.ts b/src/state/queries/notifications/feed.ts
index b91db9237..405d054d4 100644
--- a/src/state/queries/notifications/feed.ts
+++ b/src/state/queries/notifications/feed.ts
@@ -133,23 +133,6 @@ export function useNotificationFeedQuery(opts?: {enabled?: boolean}) {
   return query
 }
 
-/**
- * This helper is used by the post-thread placeholder function to
- * find a post in the query-data cache
- */
-export function findPostInQueryData(
-  queryClient: QueryClient,
-  uri: string,
-): AppBskyFeedDefs.PostView | undefined {
-  const generator = findAllPostsInQueryData(queryClient, uri)
-  const result = generator.next()
-  if (result.done) {
-    return undefined
-  } else {
-    return result.value
-  }
-}
-
 export function* findAllPostsInQueryData(
   queryClient: QueryClient,
   uri: string,