pull/35/head^2
kunfei 5 years ago
parent f6352d4e97
commit 5c15dfa5b5
  1. 2
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt
  2. 2
      app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt

@ -29,8 +29,8 @@ class BookSourceEditViewModel(application: Application) : BaseViewModel(applicat
} ?: let { } ?: let {
bookSource.customOrder = App.db.bookSourceDao().maxOrder + 1 bookSource.customOrder = App.db.bookSourceDao().maxOrder + 1
} }
sourceLiveData.postValue(bookSource)
App.db.bookSourceDao().insert(bookSource) App.db.bookSourceDao().insert(bookSource)
sourceLiveData.postValue(bookSource)
}.onFinally { }.onFinally {
finally?.let { it() } finally?.let { it() }
} }

@ -30,8 +30,8 @@ class RssSourceEditViewModel(application: Application) : BaseViewModel(applicati
} ?: let { } ?: let {
rssSource.customOrder = App.db.rssSourceDao().maxOrder + 1 rssSource.customOrder = App.db.rssSourceDao().maxOrder + 1
} }
sourceLiveData.postValue(rssSource)
App.db.rssSourceDao().insert(rssSource) App.db.rssSourceDao().insert(rssSource)
sourceLiveData.postValue(rssSource)
}.onSuccess { }.onSuccess {
success() success()
}.onError { }.onError {

Loading…
Cancel
Save