From 7a8c0a545b85416123c358619a6fc27e0d0a1bb6 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 10 Jul 2021 17:34:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=B9=A6=E6=BA=90=E6=97=B6?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E5=88=86=E7=BB=84=E5=92=8C=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E5=90=8D=E7=A7=B0=E4=B8=8D=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/ui/association/ImportBookSourceViewModel.kt | 6 +++--- .../legado/app/ui/association/ImportRssSourceViewModel.kt | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt index a67c7e7f8..4cadba770 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt @@ -53,9 +53,6 @@ class ImportBookSourceViewModel(app: Application) : BaseViewModel(app) { selectStatus.forEachIndexed { index, b -> if (b) { val source = allSources[index] - if (groupName != null) { - source.bookSourceGroup = groupName - } if (keepName) { checkSources[index]?.let { source.bookSourceName = it.bookSourceName @@ -63,6 +60,9 @@ class ImportBookSourceViewModel(app: Application) : BaseViewModel(app) { source.customOrder = it.customOrder } } + if (groupName != null) { + source.bookSourceGroup = groupName + } selectSource.add(source) } } diff --git a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceViewModel.kt index 0658d5b5a..911eb3ad0 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceViewModel.kt @@ -50,15 +50,16 @@ class ImportRssSourceViewModel(app: Application) : BaseViewModel(app) { selectStatus.forEachIndexed { index, b -> if (b) { val source = allSources[index] - if (groupName != null) { - source.sourceGroup = groupName - } if (keepName) { checkSources[index]?.let { source.sourceName = it.sourceName source.sourceGroup = it.sourceGroup + source.customOrder = it.customOrder } } + if (groupName != null) { + source.sourceGroup = groupName + } selectSource.add(source) } }