From 0f3ddb7892ad27c598c947b9c8d66e84af7e486c Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 8 Dec 2020 20:15:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=AD=E6=96=87=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/arrange/ArrangeBookActivity.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt index fa5d90a3e..b66a3c911 100644 --- a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt @@ -23,6 +23,7 @@ import io.legado.app.ui.widget.SelectActionBar import io.legado.app.ui.widget.recycler.DragSelectTouchHelper import io.legado.app.ui.widget.recycler.ItemTouchCallback import io.legado.app.ui.widget.recycler.VerticalDivider +import io.legado.app.utils.cnCompare import io.legado.app.utils.getPrefInt import io.legado.app.utils.getViewModel @@ -123,7 +124,9 @@ class ArrangeBookActivity : VMBaseActivity val books = when (getPrefInt(PreferKey.bookshelfSort)) { 1 -> list.sortedByDescending { it.latestChapterTime } - 2 -> list.sortedBy { it.name } + 2 -> list.sortedWith { o1, o2 -> + o1.name.cnCompare(o2.name) + } 3 -> list.sortedBy { it.order } else -> list.sortedByDescending { it.durChapterTime } }