Fix marking chapter as read once end is reached by scrolling

This commit is contained in:
schroda
2026-05-20 13:05:04 +02:00
parent 13914333c0
commit 67d861c51b
3 changed files with 4 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- (**Reader**) Fix wrongly positioned mobile progress bar current page indicator
- (**Reader**) Fix mobile progress bar previous/next chapter button visibility on hover and while disabled
- (**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
- (**Browse**) Fix showing only nsfw sources in the browse source page when the "show nsfw" setting is disabled
## [20260509.01] (r3147) - 2026-05-09

View File

@@ -498,7 +498,6 @@ export class ReaderControls {
(image) =>
image &&
isPageInViewport(image, type, {
truncateValues: true,
thresholds: {
bottom: 1,
left: getOptionForDirection(

View File

@@ -351,7 +351,7 @@ type InViewportOptions = {
};
const getIsPageInViewportInfo = (
element: HTMLElement,
{ truncateValues, thresholds: argThresholds }: InViewportOptions = { truncateValues: false, thresholds: {} },
{ truncateValues, thresholds: argThresholds }: InViewportOptions = { truncateValues: true, thresholds: {} },
): {
isLeftInViewport: boolean;
isRightInViewport: boolean;
@@ -425,8 +425,9 @@ export const isEndOfPageInViewport = (
element: HTMLElement,
type: PageInViewportType,
direction: ReadingDirection,
options?: InViewportOptions,
): boolean => {
const { isLeftInViewport, isRightInViewport, isBottomInViewport } = getIsPageInViewportInfo(element);
const { isLeftInViewport, isRightInViewport, isBottomInViewport } = getIsPageInViewportInfo(element, options);
switch (type) {
case PageInViewportType.X: