From fffe9d31f923451304ff85899d86280fcef3e423 Mon Sep 17 00:00:00 2001
From: Ruben Bimberg <ruben.bimberg@mni.thm.de>
Date: Wed, 28 Apr 2021 15:19:31 +0200
Subject: [PATCH] Fixed wrong merge results

---
 .../question-wall/question-wall.component.ts           | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts
index 689228e35..8148af8a7 100644
--- a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts
+++ b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts
@@ -34,7 +34,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy {
   commentsCountQuestions = 0;
   commentsCountUsers = 0;
   unreadComments = 0;
-  focusIncommingComments = false;
+  focusIncommingComments = true;
   timeUpdateInterval;
   keySupport: QuestionWallKeyEventSupport;
   hasFilter = false;
@@ -319,7 +319,13 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy {
     this.filterFunction = filter;
     this.commentsFilter = this.commentsFilteredByTime.filter(this.filterFunction);
     this.hasFilter = true;
-    setTimeout(() => this.focusFirstComment(), 0);
+    setTimeout(() => {
+      if (this.commentsFilter.length <= 0) {
+        this.commentFocus = null;
+      } else {
+        this.focusFirstComment();
+      }
+    }, 0);
     this.updateCommentsCountOverview();
   }
 
-- 
GitLab