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 2e1e46d8ac992c21e90cdb3406cbd4ed61d366d8..d9bc3652509ab282964defb1505e6bee4d8c0808 100644 --- a/src/app/components/shared/comment-list/comment-list.component.html +++ b/src/app/components/shared/comment-list/comment-list.component.html @@ -56,6 +56,10 @@ <mat-icon>visibility</mat-icon> </button> + <button mat-icon-button (focus)="hideCommentsList=true" (click)="filterMarkAsUnread()"> + <mat-icon>visibility_off</mat-icon> + </button> + <button mat-icon-button (focus)="hideCommentsList=false" (click)="sort(currentSort)"> <mat-icon>close</mat-icon> </button> 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 5d629039e2d3bcc1093946bb106d5d01d8c3bc41..689465f6db248c8fc0448c2d4e0d6477eebc3526 100644 --- a/src/app/components/shared/comment-list/comment-list.component.ts +++ b/src/app/components/shared/comment-list/comment-list.component.ts @@ -168,6 +168,10 @@ export class CommentListComponent implements OnInit { this.filteredComments = this.comments.filter(c => c.read); } + filterMarkAsUnread(): void { + this.filteredComments = this.comments.filter(c => !c.read); + } + filterMarkAsCorrect(): void { this.filteredComments = this.comments.filter(c => c.correct); }