]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/notification/peertube-socket.service.ts
Try to reduce CSS size
[github/Chocobozzz/PeerTube.git] / client / src / app / core / notification / peertube-socket.service.ts
index bc3f7b89374093c986f4c93314158f3b37466c0f..eab1c63f24f9b1654233355d9c6674de22cf62e6 100644 (file)
@@ -58,12 +58,11 @@ export class PeerTubeSocket {
       this.notificationSocket = this.io(environment.apiUrl + '/user-notifications', {
         query: { accessToken: this.auth.getAccessToken() }
       })
-
-      this.notificationSocket.on('new-notification', (n: UserNotificationServer) => {
-        this.ngZone.run(() => this.dispatchNotificationEvent('new', n))
-      })
     })
 
+    this.notificationSocket.on('new-notification', (n: UserNotificationServer) => {
+      this.ngZone.run(() => this.dispatchNotificationEvent('new', n))
+    })
   }
 
   private async initLiveVideosSocket () {