From d7fc15ce81a6a8a34af588d37b29ac3a98b3e1b7 Mon Sep 17 00:00:00 2001 From: Joseph Milazzo Date: Sun, 10 Dec 2023 14:15:08 -0600 Subject: [PATCH] On intersection, set the page number instead of prefetching. Setting the page number prefetches automatically. --- .../infinite-scroller/infinite-scroller.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts b/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts index 8cb87a74e..2a07f5b23 100644 --- a/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts +++ b/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts @@ -129,7 +129,7 @@ export class InfiniteScrollerComponent implements OnInit, OnChanges, OnDestroy { */ isScrolling: boolean = false; /** - * Whether all prefetched images have loaded on the screen (not neccesarily in viewport) + * Whether all prefetched images have loaded on the screen (not necessarily in viewport) */ allImagesLoaded: boolean = false; /** @@ -159,7 +159,7 @@ export class InfiniteScrollerComponent implements OnInit, OnChanges, OnDestroy { /** * Debug mode. Will show extra information. Use bitwise (|) operators between different modes to enable different output */ - debugMode: DEBUG_MODES = DEBUG_MODES.Outline | DEBUG_MODES.Logs; + debugMode: DEBUG_MODES = DEBUG_MODES.None; /** * Debug mode. Will filter out any messages in here, so they don't hit the log */ @@ -597,7 +597,7 @@ export class InfiniteScrollerComponent implements OnInit, OnChanges, OnDestroy { this.debugLog('[Intersection] Page ' + imagePage + ' is visible: ', entry.isIntersecting); if (entry.isIntersecting) { this.debugLog('[Intersection] ! Page ' + imagePage + ' just entered screen'); - this.prefetchWebtoonImages(imagePage); + this.setPageNum(imagePage); } }); }