diff --git a/app/src/main/java/io/legado/app/help/BookHelp.kt b/app/src/main/java/io/legado/app/help/BookHelp.kt index a033cd06b..fb0b196bb 100644 --- a/app/src/main/java/io/legado/app/help/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/BookHelp.kt @@ -251,16 +251,12 @@ object BookHelp { * 删除章节内容 */ fun delContent(book: Book, bookChapter: BookChapter) { - if (book.isLocalTxt()) { - return - } else { - FileUtils.createFileIfNotExist( - downloadDir, - cacheFolderName, - book.getFolderName(), - bookChapter.getFileName() - ).delete() - } + FileUtils.createFileIfNotExist( + downloadDir, + cacheFolderName, + book.getFolderName(), + bookChapter.getFileName() + ).delete() } /** diff --git a/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt b/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt index adc586564..65bec08f5 100644 --- a/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt +++ b/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt @@ -162,6 +162,7 @@ object LocalBook { fun deleteBook(book: Book, deleteOriginal: Boolean) { kotlin.runCatching { + BookHelp.clearCache(book) if (deleteOriginal) { if (book.bookUrl.isContentScheme()) { val uri = Uri.parse(book.bookUrl)