diff --git a/src/app/components/shared/comment-list/comment-list.component.ts b/src/app/components/shared/comment-list/comment-list.component.ts index daa3e2fe4fbb57292bef9a2748a0a0e4f757e044..7c6c9e85ab2192d79d5bb2d11f6fb4b7d24c5f88 100644 --- a/src/app/components/shared/comment-list/comment-list.component.ts +++ b/src/app/components/shared/comment-list/comment-list.component.ts @@ -32,7 +32,7 @@ export class CommentListComponent implements OnInit { voteasc = 'voteasc'; votedesc = 'votedesc'; time = 'time'; - currentSort = this.votedesc; + currentSort: string; read = 'read'; unread = 'unread'; favorite = 'favorite'; @@ -68,6 +68,9 @@ export class CommentListComponent implements OnInit { this.commentVoteMap.set(v.commentId, v); } }); + this.currentSort = this.time; + } else { + this.currentSort = this.votedesc; } this.commentService.getComments(this.roomId) .subscribe(comments => {