From ccda4d8453f796d3929dbda21c0b2e19099d8b74 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 2 Feb 2020 14:10:15 -0500 Subject: Some minor fixes. --- ui/src/components/post.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'ui/src/components/post.tsx') diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx index 9bde8585..a8a94f0b 100644 --- a/ui/src/components/post.tsx +++ b/ui/src/components/post.tsx @@ -233,6 +233,18 @@ export class Post extends Component { onChange={linkEvent(this, this.handleCommentSortChange)} /> + ); } @@ -313,6 +325,13 @@ export class Post extends Component { +a.comment.deleted - +b.comment.deleted || b.comment.published.localeCompare(a.comment.published) ); + } else if (this.state.commentSort == CommentSortType.Old) { + tree.sort( + (a, b) => + +a.comment.removed - +b.comment.removed || + +a.comment.deleted - +b.comment.deleted || + a.comment.published.localeCompare(b.comment.published) + ); } else if (this.state.commentSort == CommentSortType.Hot) { tree.sort( (a, b) => -- cgit v1.2.3