]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/notification/peertube-socket.service.ts
Remove avatarUrl from models
[github/Chocobozzz/PeerTube.git] / client / src / app / core / notification / peertube-socket.service.ts
index 089276cfcf7619ca7a15da01dc3046a6454ecfaf..eab1c63f24f9b1654233355d9c6674de22cf62e6 100644 (file)
@@ -60,7 +60,9 @@ export class PeerTubeSocket {
       })
     })
 
-    this.notificationSocket.on('new-notification', (n: UserNotificationServer) => this.dispatchNotificationEvent('new', n))
+    this.notificationSocket.on('new-notification', (n: UserNotificationServer) => {
+      this.ngZone.run(() => this.dispatchNotificationEvent('new', n))
+    })
   }
 
   private async initLiveVideosSocket () {
@@ -76,7 +78,9 @@ export class PeerTubeSocket {
     const types: LiveVideoEventType[] = [ 'views-change', 'state-change' ]
 
     for (const type of types) {
-      this.liveVideosSocket.on(type, (payload: LiveVideoEventPayload) => this.dispatchLiveVideoEvent(type, payload))
+      this.liveVideosSocket.on(type, (payload: LiveVideoEventPayload) => {
+        this.ngZone.run(() => this.dispatchLiveVideoEvent(type, payload))
+      })
     }
   }