diff options
Diffstat (limited to 'client/src/app/shared')
3 files changed, 7 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-main/angular/infinite-scroller.directive.ts b/client/src/app/shared/shared-main/angular/infinite-scroller.directive.ts index f09c3d1fc..d2cf53227 100644 --- a/client/src/app/shared/shared-main/angular/infinite-scroller.directive.ts +++ b/client/src/app/shared/shared-main/angular/infinite-scroller.directive.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { fromEvent, Observable, Subscription } from 'rxjs' | ||
1 | import { distinctUntilChanged, filter, map, share, startWith, throttleTime } from 'rxjs/operators' | 2 | import { distinctUntilChanged, filter, map, share, startWith, throttleTime } from 'rxjs/operators' |
2 | import { AfterContentChecked, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core' | 3 | import { AfterContentChecked, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core' |
3 | import { fromEvent, Observable, Subscription } from 'rxjs' | ||
4 | 4 | ||
5 | @Directive({ | 5 | @Directive({ |
6 | selector: '[myInfiniteScroller]' | 6 | selector: '[myInfiniteScroller]' |
@@ -80,7 +80,9 @@ export class InfiniteScrollerDirective implements OnInit, OnDestroy, AfterConten | |||
80 | } | 80 | } |
81 | 81 | ||
82 | private getMaximumScroll () { | 82 | private getMaximumScroll () { |
83 | return this.container.scrollHeight - window.innerHeight | 83 | const elementHeight = this.onItself ? this.container.clientHeight : window.innerHeight |
84 | |||
85 | return this.container.scrollHeight - elementHeight | ||
84 | } | 86 | } |
85 | 87 | ||
86 | private hasScroll () { | 88 | private hasScroll () { |
diff --git a/client/src/app/shared/shared-share-modal/video-share.component.ts b/client/src/app/shared/shared-share-modal/video-share.component.ts index 8d8e8a3a5..f57a50770 100644 --- a/client/src/app/shared/shared-share-modal/video-share.component.ts +++ b/client/src/app/shared/shared-share-modal/video-share.component.ts | |||
@@ -37,6 +37,7 @@ export class VideoShareComponent { | |||
37 | @Input() video: VideoDetails = null | 37 | @Input() video: VideoDetails = null |
38 | @Input() videoCaptions: VideoCaption[] = [] | 38 | @Input() videoCaptions: VideoCaption[] = [] |
39 | @Input() playlist: VideoPlaylist = null | 39 | @Input() playlist: VideoPlaylist = null |
40 | @Input() playlistPosition: number = null | ||
40 | 41 | ||
41 | activeVideoId: TabId = 'url' | 42 | activeVideoId: TabId = 'url' |
42 | activePlaylistId: TabId = 'url' | 43 | activePlaylistId: TabId = 'url' |
@@ -45,8 +46,6 @@ export class VideoShareComponent { | |||
45 | isAdvancedCustomizationCollapsed = true | 46 | isAdvancedCustomizationCollapsed = true |
46 | includeVideoInPlaylist = false | 47 | includeVideoInPlaylist = false |
47 | 48 | ||
48 | private playlistPosition: number = null | ||
49 | |||
50 | constructor (private modalService: NgbModal) { } | 49 | constructor (private modalService: NgbModal) { } |
51 | 50 | ||
52 | show (currentVideoTimestamp?: number, currentPlaylistPosition?: number) { | 51 | show (currentVideoTimestamp?: number, currentPlaylistPosition?: number) { |
@@ -107,7 +106,7 @@ export class VideoShareComponent { | |||
107 | 106 | ||
108 | if (!this.includeVideoInPlaylist) return base | 107 | if (!this.includeVideoInPlaylist) return base |
109 | 108 | ||
110 | return base + '?videoId=' + this.video.uuid | 109 | return base + '?playlistPosition=' + this.playlistPosition |
111 | } | 110 | } |
112 | 111 | ||
113 | notSecure () { | 112 | notSecure () { |
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts index 5879c4978..7c083ae26 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts | |||
@@ -78,7 +78,7 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { | |||
78 | if (!this.playlistElement || !this.playlistElement.video) return {} | 78 | if (!this.playlistElement || !this.playlistElement.video) return {} |
79 | 79 | ||
80 | return { | 80 | return { |
81 | videoId: this.playlistElement.video.uuid, | 81 | playlistPosition: this.playlistElement.position, |
82 | start: this.playlistElement.startTimestamp, | 82 | start: this.playlistElement.startTimestamp, |
83 | stop: this.playlistElement.stopTimestamp, | 83 | stop: this.playlistElement.stopTimestamp, |
84 | resume: true | 84 | resume: true |