Correctly select next chapter id for download ahead (#596)
Chapters are being fetched sorted by descending source order, thus, the next chapters index is less than the current one
Regression introduced with 7caea4e526
This commit is contained in:
@@ -224,7 +224,7 @@ export function Reader() {
|
||||
};
|
||||
|
||||
const currentChapter = getChapterFromCache(chapter.id);
|
||||
const nextChapterId = mangaChapters?.[Number(chapterIndex) + 1]?.id;
|
||||
const nextChapterId = mangaChapters?.[(mangaChapters?.length ?? 0) - Number(chapterIndex) - 1]?.id;
|
||||
const nextChapter = nextChapterId ? getChapterFromCache(nextChapterId) : null;
|
||||
|
||||
const shouldDownloadAhead =
|
||||
|
||||
Reference in New Issue
Block a user