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/login.tsx | 1 - ui/src/components/post.tsx | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'ui/src/components') diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index 8eee016e..81f98176 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -212,7 +212,6 @@ export class Login extends Component { /> - {this.state.enable_nsfw && (
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