@ -99,7 +99,6 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
}
}.onError {
toast(R.string.error_get_chapter_list)
it.printStackTrace()
} ?: toast(R.string.error_no_source)
@ -68,7 +68,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
saveRead(book)
}.onError { it.printStackTrace() }
private fun loadBookInfo(
@ -103,7 +103,6 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
}?.onError {
toast(R.string.error_load_toc)
} ?: autoChangeSource()
@ -47,8 +47,6 @@ class SearchViewModel(application: Application) : BaseViewModel(application) {
delay(100)//每隔100毫秒搜索一个书源
task?.invokeOnCompletion {
@ -39,8 +39,6 @@ class ExploreShowViewModel(application: Application) : BaseViewModel(application
App.db.searchBookDao().insert(*searchBooks.toTypedArray())
page++
@ -38,9 +38,6 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
App.db.bookChapterDao().insert(*it.toTypedArray())
.onError {
.onFinally {
synchronized(this) {
updateList.remove(book.bookUrl)