styleUrls: [ './avatar-notification.component.scss' ]
})
export class AvatarNotificationComponent implements OnInit, OnDestroy {
- @ViewChild('popover') popover: NgbPopover
+ @ViewChild('popover', { static: true }) popover: NgbPopover
@Input() user: User
unreadNotifications = 0
+ loaded = false
private notificationSub: Subscription
private routeSub: Subscription
this.popover.close()
}
+ onPopoverHidden () {
+ this.loaded = false
+ }
+
+ onNotificationLoaded () {
+ this.loaded = true
+ }
+
private async subscribeToNotifications () {
const obs = await this.userNotificationSocket.getMyNotificationsSocket()