From 995bd211e3f0cc1d146762a1d29ed15f8b7515df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=20K=C3=A4sler?= <tom.kaesler@mni.thm.de>
Date: Sun, 9 Jun 2019 13:10:39 +0200
Subject: [PATCH] Add second comment counter for when filter is active

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

diff --git a/src/app/components/shared/comment-list/comment-list.component.html b/src/app/components/shared/comment-list/comment-list.component.html
index 88fda70b2..54b135e07 100644
--- a/src/app/components/shared/comment-list/comment-list.component.html
+++ b/src/app/components/shared/comment-list/comment-list.component.html
@@ -12,7 +12,10 @@
   <span class="fill-remaining-space"></span>
 
   <div class="button-bar" fxLayoutAlign="center center">
-    <button mat-mini-fab color="primary" class="comment-counter" *ngIf="comments && comments.length > 0">{{comments.length}}</button>
+    <div *ngIf="comments && comments.length > 0">
+      <button mat-mini-fab color="primary" class="comment-counter" *ngIf="(!filteredComments) || (comments.length === filteredComments.length)">{{comments.length}}</button>
+      <button mat-mini-fab color="secondary" class="comment-counter" *ngIf="(filteredComments) && (comments.length > filteredComments.length)">{{filteredComments.length}}</button>
+    </div>
 
     <button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && comments.length > 0"
             [matMenuTriggerFor]="filterMenu" matTooltip="{{ 'comment-list.filter-comments' | translate }}">
-- 
GitLab