]> Untitled Git - lemmy.git/commitdiff
Making chat only sortable by new.
authorDessalines <tyhou13@gmx.com>
Mon, 13 Jul 2020 19:20:46 +0000 (15:20 -0400)
committerDessalines <tyhou13@gmx.com>
Mon, 13 Jul 2020 19:20:46 +0000 (15:20 -0400)
ui/src/components/post.tsx
ui/translations/en.json

index ce737a4e441bb3af4880746517a66dc0dd0b0abd..9eef286c9744cb5fea34aa4c91e1e03cb8da447d 100644 (file)
@@ -281,19 +281,6 @@ export class Post extends Component<any, PostState> {
           </label>
         </div>
         <div class="btn-group btn-group-toggle mb-2">
-          <label
-            className={`btn btn-sm btn-secondary pointer ${
-              this.state.commentViewType === CommentViewType.Tree && 'active'
-            }`}
-          >
-            {i18n.t('tree')}
-            <input
-              type="radio"
-              value={CommentViewType.Tree}
-              checked={this.state.commentViewType === CommentViewType.Tree}
-              onChange={linkEvent(this, this.handleCommentViewTypeChange)}
-            />
-          </label>
           <label
             className={`btn btn-sm btn-secondary pointer ${
               this.state.commentViewType === CommentViewType.Chat && 'active'
@@ -346,11 +333,13 @@ export class Post extends Component<any, PostState> {
 
   handleCommentSortChange(i: Post, event: any) {
     i.state.commentSort = Number(event.target.value);
+    i.state.commentViewType = CommentViewType.Tree;
     i.setState(i.state);
   }
 
   handleCommentViewTypeChange(i: Post, event: any) {
     i.state.commentViewType = Number(event.target.value);
+    i.state.commentSort = CommentSortType.New;
     i.setState(i.state);
   }
 
index 59dfa8b422b0af34fec0edbcb5603a48009ad7e3..cb4347f1ceeacb1c408662e5d55a2356d62f0d53 100644 (file)
     "community": "Community",
     "expand_here": "Expand here",
     "subscribe_to_communities": "Subscribe to some <1>communities</1>.",
-    "tree": "Tree",
     "chat": "Chat",
     "recent_comments": "Recent Comments",
     "no_results": "No results.",