|
|
@ -96,7 +96,7 @@ data class BookSource( |
|
|
|
fun addGroup(group: String) { |
|
|
|
fun addGroup(group: String) { |
|
|
|
bookSourceGroup?.let { |
|
|
|
bookSourceGroup?.let { |
|
|
|
if (!it.contains(group)) { |
|
|
|
if (!it.contains(group)) { |
|
|
|
bookSourceGroup = "$it;$group" |
|
|
|
bookSourceGroup = "$it,$group" |
|
|
|
} |
|
|
|
} |
|
|
|
} ?: let { |
|
|
|
} ?: let { |
|
|
|
bookSourceGroup = group |
|
|
|
bookSourceGroup = group |
|
|
@ -104,7 +104,7 @@ data class BookSource( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun removeGroup(group: String) { |
|
|
|
fun removeGroup(group: String) { |
|
|
|
bookSourceGroup?.splitNotBlank(",")?.toHashSet()?.let { |
|
|
|
bookSourceGroup?.splitNotBlank("[,;]".toRegex())?.toHashSet()?.let { |
|
|
|
it.remove(group) |
|
|
|
it.remove(group) |
|
|
|
bookSourceGroup = TextUtils.join(",", it) |
|
|
|
bookSourceGroup = TextUtils.join(",", it) |
|
|
|
} |
|
|
|
} |
|
|
|