From 5c15dfa5b5de50d35c8568c26ae4b4b734b63060 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 3 Oct 2019 14:49:44 +0800 Subject: [PATCH] up --- .../legado/app/ui/book/source/edit/BookSourceEditViewModel.kt | 2 +- .../io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt index 2289ea4b1..8dcfe81ed 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt @@ -29,8 +29,8 @@ class BookSourceEditViewModel(application: Application) : BaseViewModel(applicat } ?: let { bookSource.customOrder = App.db.bookSourceDao().maxOrder + 1 } - sourceLiveData.postValue(bookSource) App.db.bookSourceDao().insert(bookSource) + sourceLiveData.postValue(bookSource) }.onFinally { finally?.let { it() } } diff --git a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt index 2b8f5e242..72f0637b9 100644 --- a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt @@ -30,8 +30,8 @@ class RssSourceEditViewModel(application: Application) : BaseViewModel(applicati } ?: let { rssSource.customOrder = App.db.rssSourceDao().maxOrder + 1 } - sourceLiveData.postValue(rssSource) App.db.rssSourceDao().insert(rssSource) + sourceLiveData.postValue(rssSource) }.onSuccess { success() }.onError {