Skip to content

Commit

Permalink
Properly check if chapter should be deleted after reading it
Browse files Browse the repository at this point in the history
In case the current chapter should get deleted after reading it, it only worked in case it was already marked as read due to checking the read status from the chapter itself instead of the chapter update patch input
  • Loading branch information
schroda committed Jan 16, 2025
1 parent 92f64ef commit 9255386
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/modules/reader/utils/Reader.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ export const getChapterIdsToDeleteForChapterUpdate = (
}

const shouldDeleteChapter =
chapterToDeleteUpToDateData.isRead &&
Chapters.isDeletable(chapterToDeleteUpToDateData, deleteChaptersWithBookmark);
patch.isRead && Chapters.isDeletable(chapterToDeleteUpToDateData, deleteChaptersWithBookmark);
if (!shouldDeleteChapter) {
return [];
}
Expand Down

0 comments on commit 9255386

Please sign in to comment.