aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video')
-rw-r--r--client/src/app/shared/video/infinite-scroller.directive.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/shared/video/infinite-scroller.directive.ts b/client/src/app/shared/video/infinite-scroller.directive.ts
index ed49a9e81..e0f9f4f83 100644
--- a/client/src/app/shared/video/infinite-scroller.directive.ts
+++ b/client/src/app/shared/video/infinite-scroller.directive.ts
@@ -38,12 +38,13 @@ export class InfiniteScrollerDirective implements OnInit {
38 38
39 initialize () { 39 initialize () {
40 // Emit the last value 40 // Emit the last value
41 const throttleOptions = { leading: false, trailing: true } 41 const throttleOptions = { leading: true, trailing: true }
42 42
43 const scrollObservable = fromEvent(window, 'scroll') 43 const scrollObservable = fromEvent(window, 'scroll')
44 .startWith(true) 44 .startWith(true)
45 .throttleTime(200, undefined, throttleOptions) 45 .throttleTime(200, undefined, throttleOptions)
46 .map(() => ({ current: window.scrollY, maximumScroll: document.body.clientHeight - window.innerHeight })) 46 .map(() => ({ current: window.scrollY, maximumScroll: document.body.clientHeight - window.innerHeight }))
47 .distinctUntilChanged((o1, o2) => o1.current === o2.current)
47 .share() 48 .share()
48 49
49 // Scroll Down 50 // Scroll Down