Do not update chapter in case it has not been loaded yet (#612)
This commit is contained in:
@@ -182,6 +182,10 @@ export function Reader() {
|
||||
);
|
||||
|
||||
const updateChapter = (patch: UpdateChapterPatchInput) => {
|
||||
if (chapter === initialChapter) {
|
||||
return;
|
||||
}
|
||||
|
||||
const getChapterIdToDelete = () => {
|
||||
const isAutoDeletionEnabled = !!patch.isRead && !!metadataSettings.deleteChaptersWhileReading;
|
||||
if (!isAutoDeletionEnabled || !mangaChapters) {
|
||||
@@ -347,6 +351,10 @@ export function Reader() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (chapter === initialChapter) {
|
||||
return;
|
||||
}
|
||||
|
||||
// do not mutate the chapter, this will cause the page to jump around due to always scrolling to the last read page
|
||||
const updateLastPageRead = curPageDebounced !== -1;
|
||||
const updateIsRead = curPageDebounced === chapter.pageCount - 1;
|
||||
|
||||
Reference in New Issue
Block a user