pull/36/head
kunfei 5 years ago
parent d6832a91ec
commit 0b2007870f
  1. 1
      app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt
  2. 3
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt
  3. 2
      app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt
  4. 2
      app/src/main/java/io/legado/app/ui/explore/ExploreShowViewModel.kt
  5. 3
      app/src/main/java/io/legado/app/ui/main/MainViewModel.kt

@ -99,7 +99,6 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
} }
}.onError { }.onError {
toast(R.string.error_get_chapter_list) toast(R.string.error_get_chapter_list)
it.printStackTrace()
} }
} ?: toast(R.string.error_no_source) } ?: toast(R.string.error_no_source)
} }

@ -68,7 +68,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
} }
} }
saveRead(book) saveRead(book)
}.onError { it.printStackTrace() } }
} }
private fun loadBookInfo( private fun loadBookInfo(
@ -103,7 +103,6 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
} }
}?.onError { }?.onError {
toast(R.string.error_load_toc) toast(R.string.error_load_toc)
it.printStackTrace()
} ?: autoChangeSource() } ?: autoChangeSource()
} }
} }

@ -47,8 +47,6 @@ class SearchViewModel(application: Application) : BaseViewModel(application) {
} }
delay(100)//每隔100毫秒搜索一个书源 delay(100)//每隔100毫秒搜索一个书源
} }
}.onError {
it.printStackTrace()
} }
task?.invokeOnCompletion { task?.invokeOnCompletion {

@ -39,8 +39,6 @@ class ExploreShowViewModel(application: Application) : BaseViewModel(application
App.db.searchBookDao().insert(*searchBooks.toTypedArray()) App.db.searchBookDao().insert(*searchBooks.toTypedArray())
page++ page++
} }
}.onError {
it.printStackTrace()
} }
} }
} }

@ -38,9 +38,6 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
App.db.bookChapterDao().insert(*it.toTypedArray()) App.db.bookChapterDao().insert(*it.toTypedArray())
} }
} }
.onError {
it.printStackTrace()
}
.onFinally { .onFinally {
synchronized(this) { synchronized(this) {
updateList.remove(book.bookUrl) updateList.remove(book.bookUrl)

Loading…
Cancel
Save