From 0b2007870f99eefc9b3bd788113ec83bb6b8a1cd Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 30 Sep 2019 21:53:23 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt | 1 - .../main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt | 3 +-- .../main/java/io/legado/app/ui/book/search/SearchViewModel.kt | 2 -- .../main/java/io/legado/app/ui/explore/ExploreShowViewModel.kt | 2 -- app/src/main/java/io/legado/app/ui/main/MainViewModel.kt | 3 --- 5 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt index cb54f4df1..7b9ee2118 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt @@ -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) } diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt index a0b02a402..d6d6ae004 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt @@ -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) - it.printStackTrace() } ?: autoChangeSource() } } diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt index 0890ef013..c70078a45 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt @@ -47,8 +47,6 @@ class SearchViewModel(application: Application) : BaseViewModel(application) { } delay(100)//每隔100毫秒搜索一个书源 } - }.onError { - it.printStackTrace() } task?.invokeOnCompletion { diff --git a/app/src/main/java/io/legado/app/ui/explore/ExploreShowViewModel.kt b/app/src/main/java/io/legado/app/ui/explore/ExploreShowViewModel.kt index f36a5fc69..a9514c8e4 100644 --- a/app/src/main/java/io/legado/app/ui/explore/ExploreShowViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/explore/ExploreShowViewModel.kt @@ -39,8 +39,6 @@ class ExploreShowViewModel(application: Application) : BaseViewModel(application App.db.searchBookDao().insert(*searchBooks.toTypedArray()) page++ } - }.onError { - it.printStackTrace() } } } diff --git a/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt b/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt index 3a9c1db32..992ed6a16 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt @@ -38,9 +38,6 @@ class MainViewModel(application: Application) : BaseViewModel(application) { App.db.bookChapterDao().insert(*it.toTypedArray()) } } - .onError { - it.printStackTrace() - } .onFinally { synchronized(this) { updateList.remove(book.bookUrl)