Don't enqueue bookmarked chapters for deletion (fixes #3691)

This commit is contained in:
arkon
2020-08-18 17:47:07 -04:00
parent ba67781431
commit 4c8665c9f0
2 changed files with 19 additions and 18 deletions

View File

@@ -494,16 +494,11 @@ class MangaPresenter(
* @param chapters the chapters to delete.
*/
private fun deleteChaptersInternal(chapters: List<ChapterItem>) {
val filteredChapters = if (!preferences.removeBookmarkedChapters()) {
chapters.filterNot { it.bookmark }
} else {
chapters
}
downloadManager.deleteChapters(filteredChapters, manga, source)
filteredChapters.forEach {
it.status = Download.NOT_DOWNLOADED
it.download = null
downloadManager.deleteChapters(chapters, manga, source).forEach {
if (it is ChapterItem) {
it.status = Download.NOT_DOWNLOADED
it.download = null
}
}
}