]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/users/user-notifications.component.ts
Fix infinite scroll on big screens
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / users / user-notifications.component.ts
index ce43b604a33a929abd25447310a5e2fb01f7efd3..3c9eb369d3c54b0268b611cd4ada48c2e73735e9 100644 (file)
@@ -4,6 +4,7 @@ import { UserNotificationType } from '../../../../../shared'
 import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model'
 import { Notifier } from '@app/core'
 import { UserNotification } from '@app/shared/users/user-notification.model'
+import { Subject } from 'rxjs'
 
 @Component({
   selector: 'my-user-notifications',
@@ -24,6 +25,8 @@ export class UserNotificationsComponent implements OnInit {
 
   componentPagination: ComponentPagination
 
+  onDataSubject = new Subject<any[]>()
+
   constructor (
     private userNotificationService: UserNotificationService,
     private notifier: Notifier
@@ -47,6 +50,8 @@ export class UserNotificationsComponent implements OnInit {
             this.componentPagination.totalItems = result.total
 
             this.notificationsLoaded.emit()
+
+            this.onDataSubject.next(result.data)
           },
 
           err => this.notifier.error(err.message)