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) } }