From fb337e722d6c7f6e9a525e1d8d375a5c91fe59f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de>
Date: Sun, 23 Jun 2019 15:31:26 +0200
Subject: [PATCH] Change sort order for participants to 'time'

---
 .../components/shared/comment-list/comment-list.component.ts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 daa3e2fe4..7c6c9e85a 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 => {
-- 
GitLab