X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fmenu%2Favatar-notification.component.ts;h=a77a001ca4255f083d68cc7badc2e63e2f39a42a;hb=b28e4e5e080646ec67363cb0a16c9bd97ccffb35;hp=878c5c88c581b96947a8ecc0c2dee9b27b83c593;hpb=41d713446c2152d47943ddb0c841a9e36ca5a9db;p=oweals%2Fpeertube.git diff --git a/client/src/app/menu/avatar-notification.component.ts b/client/src/app/menu/avatar-notification.component.ts index 878c5c88c..a77a001ca 100644 --- a/client/src/app/menu/avatar-notification.component.ts +++ b/client/src/app/menu/avatar-notification.component.ts @@ -17,6 +17,7 @@ export class AvatarNotificationComponent implements OnInit, OnDestroy { @Input() user: User unreadNotifications = 0 + loaded = false private notificationSub: Subscription private routeSub: Subscription @@ -54,6 +55,14 @@ export class AvatarNotificationComponent implements OnInit, OnDestroy { this.popover.close() } + onPopoverHidden () { + this.loaded = false + } + + onNotificationLoaded () { + this.loaded = true + } + private async subscribeToNotifications () { const obs = await this.userNotificationSocket.getMyNotificationsSocket()