Skip to content

Fix loading pauses between chapters when preloading is enabled - #110

Open
PoonHarpoon wants to merge 1 commit into
AppFuton:develfrom
PoonHarpoon:fix/reader-cross-chapter-prefetch
Open

Fix loading pauses between chapters when preloading is enabled#110
PoonHarpoon wants to merge 1 commit into
AppFuton:develfrom
PoonHarpoon:fix/reader-cross-chapter-prefetch

Conversation

@PoonHarpoon

@PoonHarpoon PoonHarpoon commented Sep 8, 2026

Copy link
Copy Markdown

With Preload pages enabled, pages ahead of your current position are loaded in advance. Previously,
that preload request could run before the next chapter's page list was available. When the list arrived,
the reader added it without requesting another preload. You could read smoothly through the current chapter,
then reach the next one and have to wait for its first images to load.

This change requests preloading as soon as the next chapter's page list has been added, giving its first
images time to load while you finish the current chapter. Moving into the next chapter therefore feels much
smoother: its images can already be ready instead of starting to load as you reach them. The benefit depends
on how quickly you read and how quickly the source delivers the images.

It uses the existing Preload pages setting and its network, battery, memory, cache, and queue limits.
Only pages from the immediately following chapter are selected, and chapters already loaded are skipped.

I compiled the APK and tested it on my phone and an emulator; both are working as expected.

Tests added to check behavior is consistent.

@LandWarderer2772

Copy link
Copy Markdown
Member

Alright let me test all your PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants