From 2358006579fc02219a9420dfbf088d6e82ea4bee Mon Sep 17 00:00:00 2001 From: Ruben Bimberg <ruben.bimberg@mni.thm.de> Date: Mon, 28 Jun 2021 12:36:03 +0200 Subject: [PATCH] Fix questions filtering when clicking on a tag [Ticket: #147] --- .../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 f1c5032d3..967ff70fc 100644 --- a/src/app/components/shared/comment-list/comment-list.component.ts +++ b/src/app/components/shared/comment-list/comment-list.component.ts @@ -133,6 +133,7 @@ export class CommentListComponent implements OnInit, OnDestroy { initNavigation() { this._subscriptionEventServiceTagConfig = this.eventService.on<string>('setTagConfig').subscribe(tag => { + this.setTimePeriod(Period.all); this.clickedOnKeyword(tag); }); this._subscriptionEventServiceRoomData = this.eventService.on<string>('pushCurrentRoomData').subscribe(_ => { @@ -395,7 +396,9 @@ export class CommentListComponent implements OnInit, OnDestroy { return c.userNumber === compare; case this.keyword: this.selectedKeyword = compare; - return c.keywordsFromQuestioner ? c.keywordsFromQuestioner.includes(compare) : false; + const isInQuestioner = c.keywordsFromQuestioner ? c.keywordsFromQuestioner.includes(compare) : false; + const isInSpacy = c.keywordsFromSpacy ? c.keywordsFromSpacy.includes(compare) : false; + return isInQuestioner || isInSpacy; case this.answer: return c.answer; case this.unanswered: -- GitLab