Fix marking chapter as read once end is reached by scrolling
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -498,7 +498,6 @@ export class ReaderControls {
|
||||
(image) =>
|
||||
image &&
|
||||
isPageInViewport(image, type, {
|
||||
truncateValues: true,
|
||||
thresholds: {
|
||||
bottom: 1,
|
||||
left: getOptionForDirection(
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user