Add user notification animation
[oweals/peertube.git] / client / src / app / menu / avatar-notification.component.ts
index 878c5c88c581b96947a8ecc0c2dee9b27b83c593..a77a001ca4255f083d68cc7badc2e63e2f39a42a 100644 (file)
@@ -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()