From 9255386b1c904bed65f11db6a5fa76c6d8b71ae2 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:19:18 +0100 Subject: [PATCH] Properly check if chapter should be deleted after reading it 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 --- src/modules/reader/utils/Reader.utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/reader/utils/Reader.utils.ts b/src/modules/reader/utils/Reader.utils.ts index 7503b82c..b54191f7 100644 --- a/src/modules/reader/utils/Reader.utils.ts +++ b/src/modules/reader/utils/Reader.utils.ts @@ -78,8 +78,7 @@ export const getChapterIdsToDeleteForChapterUpdate = ( } const shouldDeleteChapter = - chapterToDeleteUpToDateData.isRead && - Chapters.isDeletable(chapterToDeleteUpToDateData, deleteChaptersWithBookmark); + patch.isRead && Chapters.isDeletable(chapterToDeleteUpToDateData, deleteChaptersWithBookmark); if (!shouldDeleteChapter) { return []; }