From 58dbaf8f516da882d6e9bdebfbdec367962e4864 Mon Sep 17 00:00:00 2001 From: Amelia <77553571+Fesaa@users.noreply.github.com> Date: Thu, 12 Jun 2025 12:50:30 +0200 Subject: [PATCH] Ignore ReadingDirection in UpDown readermode --- .../manga-reader/manga-reader.component.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts b/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts index 74bbca298..9483afdb3 100644 --- a/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts +++ b/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts @@ -1283,8 +1283,19 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy { } } + /** + * Calls the correct prev- or nextPage method based on the direction, readingDirection, and readerMode + * + * readingDirection is ignored when readerMode is Webtoon or UpDown + * + * KeyDirection.Right: right or bottom click + * KeyDirection.Left: left or top click + * @param event + * @param direction + */ handlePageChange(event: any, direction: KeyDirection) { - if (this.readerMode === ReaderMode.Webtoon) { + // Webtoons and UpDown reading mode should not take ReadingDirection into account + if (this.readerMode === ReaderMode.Webtoon || this.readerMode === ReaderMode.UpDown) { if (direction === KeyDirection.Right) { this.nextPage(event); } else { @@ -1292,6 +1303,7 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy { } return; } + if (direction === KeyDirection.Right) { this.readingDirection === ReadingDirection.LeftToRight ? this.nextPage(event) : this.prevPage(event); } else if (direction === KeyDirection.Left) {