pull/1630/head
kunfei 3 years ago
parent 400db881ad
commit c3a9d76ce8
  1. 16
      app/src/main/java/io/legado/app/help/BookHelp.kt
  2. 1
      app/src/main/java/io/legado/app/model/localBook/LocalBook.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()
}
/**

@ -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)

Loading…
Cancel
Save