导入书源时重命名分组和保留名称不冲突

pull/1114/head
gedoor 3 years ago
parent d172062c00
commit 7a8c0a545b
  1. 6
      app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt
  2. 7
      app/src/main/java/io/legado/app/ui/association/ImportRssSourceViewModel.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)
}
}

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

Loading…
Cancel
Save