unsubscribre from "read all" event

This commit is contained in:
Sofia Papacharalampous 2024-05-20 11:40:06 +03:00
parent 05a90d6fbd
commit a6b04e9ce5
1 changed files with 2 additions and 1 deletions

View File

@ -348,12 +348,13 @@ export class NavbarComponent extends BaseComponent implements OnInit {
position: { top: '71px', right: '4.8em' },
width: "27.0rem"
});
this.inAppNotificationDialog.componentInstance.onReadAll.subscribe(() => {
const onReadAllSubscription = this.inAppNotificationDialog.componentInstance.onReadAll.subscribe(() => {
this.countUnreadInappNotifications();
});
this.inAppNotificationDialog.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
this.countUnreadInappNotifications();
this.inAppNotificationDialog = null;
onReadAllSubscription.unsubscribe();
});
}
}