pull/35/head^2
kunfei 5 years ago
parent 2144939658
commit 08dcf5de24
  1. 1
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt
  2. 1
      app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.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() }

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

Loading…
Cancel
Save