diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comments.component.ts | 6 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts index dc62fe5ae..2616820d2 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts | |||
@@ -83,11 +83,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
83 | this.highlightedThread = new VideoComment(res.comment) | 83 | this.highlightedThread = new VideoComment(res.comment) |
84 | 84 | ||
85 | // Scroll to the highlighted thread | 85 | // Scroll to the highlighted thread |
86 | setTimeout(() => { | 86 | setTimeout(() => this.commentHighlightBlock.nativeElement.scrollIntoView(), 0) |
87 | // -60 because of the fixed header | ||
88 | const scrollY = this.commentHighlightBlock.nativeElement.offsetTop - 60 | ||
89 | window.scroll(0, scrollY) | ||
90 | }, 500) | ||
91 | } | 87 | } |
92 | }, | 88 | }, |
93 | 89 | ||
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 7765c4660..67c5254b3 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -375,7 +375,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
375 | this.remoteServerDown = false | 375 | this.remoteServerDown = false |
376 | 376 | ||
377 | let startTime = urlOptions.startTime || (this.video.userHistory ? this.video.userHistory.currentTime : 0) | 377 | let startTime = urlOptions.startTime || (this.video.userHistory ? this.video.userHistory.currentTime : 0) |
378 | // Don't start the video if we are at the end | 378 | // If we are at the end of the video, reset the timer |
379 | if (this.video.duration - startTime <= 1) startTime = 0 | 379 | if (this.video.duration - startTime <= 1) startTime = 0 |
380 | 380 | ||
381 | if (this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig())) { | 381 | if (this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig())) { |