pull/35/head^2
kunfei 5 years ago
parent 5c15dfa5b5
commit c028e643e3
  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

@ -24,7 +24,6 @@ class BookSourceEditViewModel(application: Application) : BaseViewModel(applicat
fun save(bookSource: BookSource, finally: (() -> Unit)? = null) {
execute {
sourceLiveData.value?.let {
bookSource.customOrder = it.customOrder
App.db.bookSourceDao().delete(it)
} ?: let {
bookSource.customOrder = App.db.bookSourceDao().maxOrder + 1

@ -25,7 +25,6 @@ class RssSourceEditViewModel(application: Application) : BaseViewModel(applicati
fun save(rssSource: RssSource, success: (() -> Unit)) {
execute {
sourceLiveData.value?.let {
rssSource.customOrder = it.customOrder
App.db.rssSourceDao().delete(it)
} ?: let {
rssSource.customOrder = App.db.rssSourceDao().maxOrder + 1

Loading…
Cancel
Save