From c028e643e3fe2afbea3dd98c373383f75d9c3b15 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 3 Oct 2019 14:55:56 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt | 1 - .../io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt | 1 - 2 files changed, 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt index 8dcfe81ed..9c8a1d8ca 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.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 diff --git a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt index 72f0637b9..b6dd3af87 100644 --- a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt @@ -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