mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-05-23 20:02:15 +00:00
fix for the "jump back" bug that occurred when scrolling up in vertical continuous and webtoon reader modes. - `ChapterPreloadManager` was maintaining its own `_currentIndex`. - When prepending previous chapter pages, the index was being incremented twice (once in the manager + once in `_handlePrevChapterPrepended`). - This caused `itemScrollController.jumpTo()` to overshoot, resulting in a visible jump forward (perceived as "jump back" while trying to scroll up). - Removed all index management (`_currentIndex`, getter, setter, startIndex) from `ChapterPreloadManager` and `ReaderMemoryManagement`. - `ChapterPreloadManager` is now a pure data container (only manages `_pages`). - `_handlePrevChapterPrepended` now captures the **current visible top index** *before* prepending and adjusts the scroll position only once. - `_readProgressListener` is now the single source of truth for `_currentIndex`. - Removed stale `initialScrollIndex` logic from preload initialization. |
||
|---|---|---|
| .. | ||
| chapter_preload_manager.dart | ||