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()