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 {
bookSource.customOrder = App.db.bookSourceDao().maxOrder + 1
}
sourceLiveData.postValue(bookSource)
App.db.bookSourceDao().insert(bookSource)
sourceLiveData.postValue(bookSource)
}.onFinally {
finally?.let { it() }
}

@ -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 {

Loading…
Cancel
Save