feat: 修复bug

pull/248/head
gedoor 5 years ago
parent 7f5ca68b29
commit bb61114ac7
  1. 5
      app/src/main/java/io/legado/app/ui/main/MainViewModel.kt

@ -3,6 +3,7 @@ package io.legado.app.ui.main
import android.app.Application import android.app.Application
import io.legado.app.App import io.legado.app.App
import io.legado.app.base.BaseViewModel import io.legado.app.base.BaseViewModel
import io.legado.app.constant.BookType
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.data.entities.RssSource import io.legado.app.data.entities.RssSource
@ -26,7 +27,9 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
fun upChapterList(books: List<Book>) { fun upChapterList(books: List<Book>) {
execute { execute {
books.forEach { book -> books.filter {
it.origin != BookType.local && it.canUpdate
}.forEach { book ->
if (!updateList.contains(book.bookUrl)) { if (!updateList.contains(book.bookUrl)) {
App.db.bookSourceDao().getBookSource(book.origin)?.let { bookSource -> App.db.bookSourceDao().getBookSource(book.origin)?.let { bookSource ->
synchronized(this) { synchronized(this) {

Loading…
Cancel
Save