diff options
author | Dessalines <tyhou13@gmx.com> | 2020-07-13 15:20:46 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-07-13 15:20:46 -0400 |
commit | 23688f17bbbd6fa35af797f171ef6fe589153cb7 (patch) | |
tree | 9f26495159442f4184d2169c7096623efdd002aa | |
parent | abe7a41f585efac68678697658c18de5e5355808 (diff) |
Making chat only sortable by new.
-rw-r--r-- | ui/src/components/post.tsx | 15 | ||||
-rw-r--r-- | ui/translations/en.json | 1 |
2 files changed, 2 insertions, 14 deletions
diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx index ce737a4e..9eef286c 100644 --- a/ui/src/components/post.tsx +++ b/ui/src/components/post.tsx @@ -283,19 +283,6 @@ export class Post extends Component<any, PostState> { <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); } diff --git a/ui/translations/en.json b/ui/translations/en.json index 59dfa8b4..cb4347f1 100644 --- a/ui/translations/en.json +++ b/ui/translations/en.json @@ -177,7 +177,6 @@ "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.", |