Merge pull request #1794 from ag2s20150909/master

修复书源类型为图片的不在缓存界面出现
pull/1814/head
kunfei 3 years ago committed by GitHub
commit 2e62d0b8f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt

@ -10,6 +10,7 @@ import io.legado.app.R
import io.legado.app.base.VMBaseActivity
import io.legado.app.constant.AppConst
import io.legado.app.constant.AppConst.charsets
import io.legado.app.constant.BookType
import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey
import io.legado.app.data.appDb
@ -160,7 +161,7 @@ class CacheActivity : VMBaseActivity<ActivityCacheBookBinding, CacheViewModel>()
else -> appDb.bookDao.flowByGroup(groupId)
}.conflate().map { books ->
val booksDownload = books.filter {
it.type == 0
it.type == BookType.default || it.type == BookType.image
}
when (getPrefInt(PreferKey.bookshelfSort)) {
1 -> booksDownload.sortedByDescending { it.latestChapterTime }

Loading…
Cancel
Save