diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-11 14:09:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 14:09:23 +0100 |
commit | b718fd22374d64534bcfe69932cf562894abed6a (patch) | |
tree | 311d3c67e2a4d1f33ebdd1dc163527de9d33d0f7 /client/src/app/menu/avatar-notification.component.ts | |
parent | adb115f5522bea4d52456a9fc5eb4140bb064476 (diff) | |
parent | 501e961199578129629cf0567033d13efced9904 (diff) | |
download | PeerTube-b718fd22374d64534bcfe69932cf562894abed6a.tar.gz PeerTube-b718fd22374d64534bcfe69932cf562894abed6a.tar.zst PeerTube-b718fd22374d64534bcfe69932cf562894abed6a.zip |
Merge branch 'develop' into pr/1285
Diffstat (limited to 'client/src/app/menu/avatar-notification.component.ts')
-rw-r--r-- | client/src/app/menu/avatar-notification.component.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/menu/avatar-notification.component.ts b/client/src/app/menu/avatar-notification.component.ts index 60e090726..f1af08096 100644 --- a/client/src/app/menu/avatar-notification.component.ts +++ b/client/src/app/menu/avatar-notification.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core' | |||
2 | import { User } from '../shared/users/user.model' | 2 | import { User } from '../shared/users/user.model' |
3 | import { UserNotificationService } from '@app/shared/users/user-notification.service' | 3 | import { UserNotificationService } from '@app/shared/users/user-notification.service' |
4 | import { Subscription } from 'rxjs' | 4 | import { Subscription } from 'rxjs' |
5 | import { Notifier } from '@app/core' | 5 | import { Notifier, UserNotificationSocket } from '@app/core' |
6 | import { NgbPopover } from '@ng-bootstrap/ng-bootstrap' | 6 | import { NgbPopover } from '@ng-bootstrap/ng-bootstrap' |
7 | import { NavigationEnd, Router } from '@angular/router' | 7 | import { NavigationEnd, Router } from '@angular/router' |
8 | import { filter } from 'rxjs/operators' | 8 | import { filter } from 'rxjs/operators' |
@@ -23,6 +23,7 @@ export class AvatarNotificationComponent implements OnInit, OnDestroy { | |||
23 | 23 | ||
24 | constructor ( | 24 | constructor ( |
25 | private userNotificationService: UserNotificationService, | 25 | private userNotificationService: UserNotificationService, |
26 | private userNotificationSocket: UserNotificationSocket, | ||
26 | private notifier: Notifier, | 27 | private notifier: Notifier, |
27 | private router: Router | 28 | private router: Router |
28 | ) {} | 29 | ) {} |
@@ -53,7 +54,7 @@ export class AvatarNotificationComponent implements OnInit, OnDestroy { | |||
53 | } | 54 | } |
54 | 55 | ||
55 | private subscribeToNotifications () { | 56 | private subscribeToNotifications () { |
56 | this.notificationSub = this.userNotificationService.getMyNotificationsSocket() | 57 | this.notificationSub = this.userNotificationSocket.getMyNotificationsSocket() |
57 | .subscribe(data => { | 58 | .subscribe(data => { |
58 | if (data.type === 'new') return this.unreadNotifications++ | 59 | if (data.type === 'new') return this.unreadNotifications++ |
59 | if (data.type === 'read') return this.unreadNotifications-- | 60 | if (data.type === 'read') return this.unreadNotifications-- |