]> Untitled Git - lemmy.git/commitdiff
Adding options below comment searches. Fixes #412
authorDessalines <tyhou13@gmx.com>
Tue, 14 Jan 2020 04:04:47 +0000 (23:04 -0500)
committerDessalines <tyhou13@gmx.com>
Tue, 14 Jan 2020 04:04:47 +0000 (23:04 -0500)
ui/src/components/search.tsx

index 00c670d821d9361c206dfe747ef257c00bbfe429..70219d4e7e95a5ea3c42c24fd4ff02d36cef5c54 100644 (file)
@@ -82,14 +82,7 @@ export class Search extends Component<any, SearchState> {
     this.handleSortChange = this.handleSortChange.bind(this);
 
     this.subscription = WebSocketService.Instance.subject
-      .pipe(
-        retryWhen(errors =>
-          errors.pipe(
-            delay(3000),
-            take(10)
-          )
-        )
-      )
+      .pipe(retryWhen(errors => errors.pipe(delay(3000), take(10))))
       .subscribe(
         msg => this.parseMessage(msg),
         err => console.error(err),
@@ -266,7 +259,7 @@ export class Search extends Component<any, SearchState> {
             {i.type_ == 'comments' && (
               <CommentNodes
                 nodes={[{ comment: i.data as Comment }]}
-                viewOnly
+                locked
                 noIndent
               />
             )}
@@ -317,7 +310,7 @@ export class Search extends Component<any, SearchState> {
     return (
       <div>
         {this.state.searchResponse.comments.map(comment => (
-          <CommentNodes nodes={[{ comment: comment }]} noIndent viewOnly />
+          <CommentNodes nodes={[{ comment: comment }]} locked noIndent />
         ))}
       </div>
     );