about summary refs log tree commit diff
path: root/src/view/com/post/Post.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-03-21 17:58:50 -0500
committerGitHub <noreply@github.com>2023-03-21 17:58:50 -0500
commita7e3ce25854d6186b77e68c155a9a8bcdbd896ec (patch)
tree55c1a86575876c50824be7175a047c3e409ff7e6 /src/view/com/post/Post.tsx
parent48e18662f69530d5c201d08014a039126c88e7dd (diff)
downloadvoidsky-a7e3ce25854d6186b77e68c155a9a8bcdbd896ec.tar.zst
Add fulltext search for posts and profiles (closes #340) (#342)
* Refactor mobile search screen

* Remove 'staleness' fetch trigger on search

* Implement a temporary fulltext search solution

* Add missing key from profile search result

* A few UI & UX improvements to the search suggestions

* Update web search suggestions

* Implement search in web build
Diffstat (limited to 'src/view/com/post/Post.tsx')
-rw-r--r--src/view/com/post/Post.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx
index ac7d1cc55..a6c66d143 100644
--- a/src/view/com/post/Post.tsx
+++ b/src/view/com/post/Post.tsx
@@ -30,11 +30,13 @@ export const Post = observer(function Post({
   uri,
   initView,
   showReplyLine,
+  hideError,
   style,
 }: {
   uri: string
   initView?: PostThreadViewModel
   showReplyLine?: boolean
+  hideError?: boolean
   style?: StyleProp<ViewStyle>
 }) {
   const pal = usePalette('default')
@@ -70,6 +72,9 @@ export const Post = observer(function Post({
   // error
   // =
   if (view.hasError || !view.thread || !view.thread?.postRecord) {
+    if (hideError) {
+      return <View />
+    }
     return (
       <View style={pal.view}>
         <Text>{view.error || 'Thread not found'}</Text>