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 { } ?: 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)
}.onFinally { }.onFinally {
finally?.let { it() } finally?.let { it() }

@ -30,6 +30,7 @@ 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)
}.onSuccess { }.onSuccess {
success() success()

Loading…
Cancel
Save