From aa39158b5b352bfe0540ee4e469feeb3c0d1fbf5 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 8 Dec 2020 16:56:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/widget/font/FontSelectDialog.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt index 65c99b66f..5ddecbe54 100644 --- a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt +++ b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt @@ -199,7 +199,7 @@ class FontSelectDialog : BaseDialogFragment(), private fun mergeFontItems( items1: ArrayList, items2: ArrayList - ): ArrayList { + ): List { val items = ArrayList(items1) items2.forEach { item2 -> var isInFirst = false @@ -213,8 +213,9 @@ class FontSelectDialog : BaseDialogFragment(), items.add(item2) } } - items.sortBy { it.name } - return items + return items.sortedWith { o1, o2 -> + o1.name.cnCompare(o2.name) + } } override fun onClick(docItem: DocItem) {