From 08dcf5de24746ce02bf136b3077353fa00f9b05d Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 3 Oct 2019 14:37:35 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt | 1 + .../io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt | 1 + 2 files changed, 2 insertions(+) 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 8bff89145..2289ea4b1 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,6 +29,7 @@ class BookSourceEditViewModel(application: Application) : BaseViewModel(applicat } ?: let { bookSource.customOrder = App.db.bookSourceDao().maxOrder + 1 } + sourceLiveData.postValue(bookSource) App.db.bookSourceDao().insert(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 aec9924ea..2b8f5e242 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,6 +30,7 @@ class RssSourceEditViewModel(application: Application) : BaseViewModel(applicati } ?: let { rssSource.customOrder = App.db.rssSourceDao().maxOrder + 1 } + sourceLiveData.postValue(rssSource) App.db.rssSourceDao().insert(rssSource) }.onSuccess { success()