diff options
Diffstat (limited to 'client/src/app/videos/+video-watch/video-watch.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index 3825e8449..5e4823c9c 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -60,6 +60,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
60 | private markdownService: MarkdownService | 60 | private markdownService: MarkdownService |
61 | ) {} | 61 | ) {} |
62 | 62 | ||
63 | get user () { | ||
64 | return this.authService.getUser() | ||
65 | } | ||
66 | |||
63 | ngOnInit () { | 67 | ngOnInit () { |
64 | this.videoService.getVideos({ currentPage: 1, itemsPerPage: 5 }, '-createdAt') | 68 | this.videoService.getVideos({ currentPage: 1, itemsPerPage: 5 }, '-createdAt') |
65 | .subscribe( | 69 | .subscribe( |
@@ -204,7 +208,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
204 | } | 208 | } |
205 | 209 | ||
206 | isVideoBlacklistable () { | 210 | isVideoBlacklistable () { |
207 | return this.video.isBlackistableBy(this.authService.getUser()) | 211 | return this.video.isBlackistableBy(this.user) |
208 | } | 212 | } |
209 | 213 | ||
210 | getAvatarPath () { | 214 | getAvatarPath () { |
@@ -264,7 +268,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
264 | this.video = video | 268 | this.video = video |
265 | 269 | ||
266 | let observable | 270 | let observable |
267 | if (this.video.isVideoNSFWForUser(this.authService.getUser())) { | 271 | if (this.video.isVideoNSFWForUser(this.user)) { |
268 | observable = this.confirmService.confirm( | 272 | observable = this.confirmService.confirm( |
269 | 'This video contains mature or explicit content. Are you sure you want to watch it?', | 273 | 'This video contains mature or explicit content. Are you sure you want to watch it?', |
270 | 'Mature or explicit content' | 274 | 'Mature or explicit content' |