Fix infinite scroll with disabled transition page

fixes #1108
This commit is contained in:
schroda
2026-05-21 00:55:49 +02:00
parent de2fe88f81
commit 53c24280c3
2 changed files with 5 additions and 3 deletions

View File

@@ -42,6 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- (**Reader**) Fix jumping back to the first page on window resize - (**Reader**) Fix jumping back to the first page on window resize
- (**Reader**) Fix chapter not getting marked as read in continuous reading mode in case the last page is not big enough to get marked as the current page - (**Reader**) Fix chapter not getting marked as read in continuous reading mode in case the last page is not big enough to get marked as the current page
- (**Browse**) Fix showing only nsfw sources in the browse source page when the "show nsfw" setting is disabled - (**Browse**) Fix showing only nsfw sources in the browse source page when the "show nsfw" setting is disabled
- (**Reader**) Fix infinite scrolling with disabled transition page
## [20260509.01] (r3147) - 2026-05-09 ## [20260509.01] (r3147) - 2026-05-09

View File

@@ -272,10 +272,12 @@ export const useReaderInfiniteScrollUpdateChapter = (
const onScroll = () => { const onScroll = () => {
const isAtStartX = scrollElement.scrollLeft === 0; const isAtStartX = scrollElement.scrollLeft === 0;
const isAtEndX = scrollElement.scrollLeft === scrollElement.scrollWidth - scrollElement.clientWidth; const isAtEndX =
Math.ceil(scrollElement.scrollLeft) === scrollElement.scrollWidth - scrollElement.clientWidth;
const isAtStartY = scrollElement.scrollTop === 0; const isAtStartY = scrollElement.scrollTop === 0;
const isAtEndY = scrollElement.scrollTop === scrollElement.scrollHeight - scrollElement.clientHeight; const isAtEndY =
Math.ceil(scrollElement.scrollTop) === scrollElement.scrollHeight - scrollElement.clientHeight;
const isAtStart = isContinuousVerticalReadingModeActive ? isAtStartY : isAtStartX; const isAtStart = isContinuousVerticalReadingModeActive ? isAtStartY : isAtStartX;
const isAtEnd = isContinuousVerticalReadingModeActive ? isAtEndY : isAtEndX; const isAtEnd = isContinuousVerticalReadingModeActive ? isAtEndY : isAtEndX;
@@ -306,7 +308,6 @@ export const useReaderInfiniteScrollUpdateChapter = (
useCallback( useCallback(
(entries) => { (entries) => {
if ( if (
// !shouldShowTransitionPage ||
!shouldUseInfiniteScroll || !shouldUseInfiniteScroll ||
!isContinuousReadingMode(readingMode) || !isContinuousReadingMode(readingMode) ||
chapterToOpenId === undefined chapterToOpenId === undefined