From e7ecca5c0d351e5dad51a55e695eac37a44bbf55 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 23 Jun 2020 21:26:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E6=9C=89=E6=95=88=E4=B9=A6=E6=BA=90=E7=A7=BB=E9=99=A4=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E5=88=86=E7=BB=84=E5=A4=B1=E8=B4=A5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/data/entities/BookSource.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/entities/BookSource.kt b/app/src/main/java/io/legado/app/data/entities/BookSource.kt index 62026ef7b..48e436262 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookSource.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookSource.kt @@ -96,7 +96,7 @@ data class BookSource( fun addGroup(group: String) { bookSourceGroup?.let { if (!it.contains(group)) { - bookSourceGroup = "$it;$group" + bookSourceGroup = "$it,$group" } } ?: let { bookSourceGroup = group @@ -104,7 +104,7 @@ data class BookSource( } fun removeGroup(group: String) { - bookSourceGroup?.splitNotBlank(",")?.toHashSet()?.let { + bookSourceGroup?.splitNotBlank("[,;]".toRegex())?.toHashSet()?.let { it.remove(group) bookSourceGroup = TextUtils.join(",", it) }