diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt index de77fb446..3b3534caa 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt @@ -22,10 +22,7 @@ import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.backgroundColor import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.widget.recycler.VerticalDivider -import io.legado.app.utils.applyTint -import io.legado.app.utils.requestInputMethod -import io.legado.app.utils.setLayout -import io.legado.app.utils.splitNotBlank +import io.legado.app.utils.* import io.legado.app.utils.viewbindingdelegate.viewBinding import kotlinx.coroutines.launch @@ -62,7 +59,11 @@ class GroupManageDialog : BaseDialogFragment(R.layout.dialog_recycler_view), it.map { group -> groups.addAll(group.splitNotBlank(AppPattern.splitGroupRegex)) } - adapter.setItems(groups.toList()) + adapter.setItems( + groups.sortedWith { o1, o2 -> + o1.cnCompare(o2) + } + ) } } }