Hide the notification badge when notification count equals 0 (#94)

This commit is contained in:
Milad Raeisi 2023-02-16 11:36:54 +04:00 committed by GitHub
parent 4d0c5572db
commit cc85c7a8f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@
<span *ngIf="displayLabels">Feed</span>
</a>
<a [routerLink]="['/notifications']" mat-menu-item (click)="toggleMenu()" [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="active">
<mat-icon [matBadge]="ui.unreadNotifications$ | async">notifications</mat-icon>
<mat-icon [matBadgeHidden] = "(ui.unreadNotifications$ | async) == 0" [matBadge]="ui.unreadNotifications$ | async">notifications</mat-icon>
<span *ngIf="displayLabels">Notifications</span>
</a>
<!-- <a [routerLink]="['/chat']" mat-menu-item (click)="toggleMenu()" [routerLinkActiveOptions]="{ exact: true }" routerLinkActive="active">