mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-04 16:09:41 +00:00
Making chat only sortable by new.
This commit is contained in:
parent
abe7a41f58
commit
23688f17bb
2 changed files with 2 additions and 14 deletions
15
ui/src/components/post.tsx
vendored
15
ui/src/components/post.tsx
vendored
|
@ -281,19 +281,6 @@ export class Post extends Component<any, PostState> {
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group btn-group-toggle mb-2">
|
<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
|
<label
|
||||||
className={`btn btn-sm btn-secondary pointer ${
|
className={`btn btn-sm btn-secondary pointer ${
|
||||||
this.state.commentViewType === CommentViewType.Chat && 'active'
|
this.state.commentViewType === CommentViewType.Chat && 'active'
|
||||||
|
@ -346,11 +333,13 @@ export class Post extends Component<any, PostState> {
|
||||||
|
|
||||||
handleCommentSortChange(i: Post, event: any) {
|
handleCommentSortChange(i: Post, event: any) {
|
||||||
i.state.commentSort = Number(event.target.value);
|
i.state.commentSort = Number(event.target.value);
|
||||||
|
i.state.commentViewType = CommentViewType.Tree;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleCommentViewTypeChange(i: Post, event: any) {
|
handleCommentViewTypeChange(i: Post, event: any) {
|
||||||
i.state.commentViewType = Number(event.target.value);
|
i.state.commentViewType = Number(event.target.value);
|
||||||
|
i.state.commentSort = CommentSortType.New;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
ui/translations/en.json
vendored
1
ui/translations/en.json
vendored
|
@ -177,7 +177,6 @@
|
||||||
"community": "Community",
|
"community": "Community",
|
||||||
"expand_here": "Expand here",
|
"expand_here": "Expand here",
|
||||||
"subscribe_to_communities": "Subscribe to some <1>communities</1>.",
|
"subscribe_to_communities": "Subscribe to some <1>communities</1>.",
|
||||||
"tree": "Tree",
|
|
||||||
"chat": "Chat",
|
"chat": "Chat",
|
||||||
"recent_comments": "Recent Comments",
|
"recent_comments": "Recent Comments",
|
||||||
"no_results": "No results.",
|
"no_results": "No results.",
|
||||||
|
|
Loading…
Reference in a new issue