aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-list/video-overview.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/video-list/video-overview.component.ts')
-rw-r--r--client/src/app/videos/video-list/video-overview.component.ts25
1 files changed, 14 insertions, 11 deletions
diff --git a/client/src/app/videos/video-list/video-overview.component.ts b/client/src/app/videos/video-list/video-overview.component.ts
index 101073949..8ff8400db 100644
--- a/client/src/app/videos/video-list/video-overview.component.ts
+++ b/client/src/app/videos/video-list/video-overview.component.ts
@@ -1,11 +1,11 @@
1import { Subject } from 'rxjs'
1import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
2import { AuthService, Notifier } from '@app/core' 3import { Notifier } from '@app/core'
3import { I18n } from '@ngx-translate/i18n-polyfill' 4import { User, UserService } from '@app/shared'
4import { VideosOverview } from '@app/shared/overview/videos-overview.model' 5import { ScreenService } from '@app/shared/misc/screen.service'
5import { OverviewService } from '@app/shared/overview' 6import { OverviewService } from '@app/shared/overview'
7import { VideosOverview } from '@app/shared/overview/videos-overview.model'
6import { Video } from '@app/shared/video/video.model' 8import { Video } from '@app/shared/video/video.model'
7import { ScreenService } from '@app/shared/misc/screen.service'
8import { Subject } from 'rxjs'
9 9
10@Component({ 10@Component({
11 selector: 'my-video-overview', 11 selector: 'my-video-overview',
@@ -18,6 +18,8 @@ export class VideoOverviewComponent implements OnInit {
18 overviews: VideosOverview[] = [] 18 overviews: VideosOverview[] = []
19 notResults = false 19 notResults = false
20 20
21 userMiniature: User
22
21 private loaded = false 23 private loaded = false
22 private currentPage = 1 24 private currentPage = 1
23 private maxPage = 20 25 private maxPage = 20
@@ -25,19 +27,20 @@ export class VideoOverviewComponent implements OnInit {
25 private isLoading = false 27 private isLoading = false
26 28
27 constructor ( 29 constructor (
28 private i18n: I18n,
29 private notifier: Notifier, 30 private notifier: Notifier,
30 private authService: AuthService, 31 private userService: UserService,
31 private overviewService: OverviewService, 32 private overviewService: OverviewService,
32 private screenService: ScreenService 33 private screenService: ScreenService
33 ) { } 34 ) { }
34 35
35 get user () {
36 return this.authService.getUser()
37 }
38
39 ngOnInit () { 36 ngOnInit () {
40 this.loadMoreResults() 37 this.loadMoreResults()
38
39 this.userService.getAnonymousOrLoggedUser()
40 .subscribe(user => this.userMiniature = user)
41
42 this.userService.listenAnonymousUpdate()
43 .subscribe(user => this.userMiniature = user)
41 } 44 }
42 45
43 buildVideoChannelBy (object: { videos: Video[] }) { 46 buildVideoChannelBy (object: { videos: Video[] }) {