about summary refs log tree commit diff
path: root/src/state/cache/post-shadow.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-12-07 17:20:17 -0800
committerGitHub <noreply@github.com>2023-12-07 17:20:17 -0800
commit7b5033118895448ae36c0ac2d76683ecd838f5e2 (patch)
treea9561eb741de580106d182460fc0ba4a5e825a68 /src/state/cache/post-shadow.ts
parent448a403c81367c46b1323c4b545e02aaea0b92da (diff)
downloadvoidsky-7b5033118895448ae36c0ac2d76683ecd838f5e2.tar.zst
Various search fixes (#2145)
* Add posts-search query to shadow cache search

* Update user search to use correct endpoint

* Fix: include cursor in post search
Diffstat (limited to 'src/state/cache/post-shadow.ts')
-rw-r--r--src/state/cache/post-shadow.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state/cache/post-shadow.ts b/src/state/cache/post-shadow.ts
index e02d4f1ea..55913e48d 100644
--- a/src/state/cache/post-shadow.ts
+++ b/src/state/cache/post-shadow.ts
@@ -6,6 +6,7 @@ import {Shadow, castAsShadow} from './types'
 import {findAllPostsInQueryData as findAllPostsInNotifsQueryData} from '../queries/notifications/feed'
 import {findAllPostsInQueryData as findAllPostsInFeedQueryData} from '../queries/post-feed'
 import {findAllPostsInQueryData as findAllPostsInThreadQueryData} from '../queries/post-thread'
+import {findAllPostsInQueryData as findAllPostsInSearchQueryData} from '../queries/search-posts'
 import {queryClient} from 'lib/react-query'
 export type {Shadow} from './types'
 
@@ -98,4 +99,7 @@ function* findPostsInCache(
       yield node.post
     }
   }
+  for (let post of findAllPostsInSearchQueryData(queryClient, uri)) {
+    yield post
+  }
 }