修复递归爆栈bug

pull/2018/head
821938089 3 years ago
parent 9f3877ebf9
commit ca4a1d2a74
  1. 6
      app/src/main/java/io/legado/app/model/CacheBook.kt

@ -212,15 +212,15 @@ object CacheBook {
}
if (onDownloadSet.contains(chapterIndex)) {
waitDownloadSet.remove(chapterIndex)
return download(scope, context)
return false
}
val chapter = appDb.bookChapterDao.getChapter(book.bookUrl, chapterIndex) ?: let {
waitDownloadSet.remove(chapterIndex)
return download(scope, context)
return false
}
if (BookHelp.hasContent(book, chapter)) {
waitDownloadSet.remove(chapterIndex)
return download(scope, context)
return false
}
waitDownloadSet.remove(chapterIndex)
onDownloadSet.add(chapterIndex)

Loading…
Cancel
Save