From e7fbe6689c658141a292e9a155e3888130a6b485 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 7 Mar 2022 11:49:01 +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 --- .../app/ui/book/local/ImportBookViewModel.kt | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/local/ImportBookViewModel.kt b/app/src/main/java/io/legado/app/ui/book/local/ImportBookViewModel.kt index 400eadb4c..6d0e61bcd 100644 --- a/app/src/main/java/io/legado/app/ui/book/local/ImportBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/local/ImportBookViewModel.kt @@ -59,24 +59,13 @@ class ImportBookViewModel(application: Application) : BaseViewModel(application) }.map { docList -> when (sort) { 2 -> docList.sortedWith( - compareBy( - { !it.isDir }, - { it.date }, - { it.name } - ) + compareBy({ !it.isDir }, { it.date }, { it.name }) ) 1 -> docList.sortedWith( - compareBy( - { !it.isDir }, - { it.size }, - { it.name } - ) + compareBy({ !it.isDir }, { it.size }, { it.name }) ) else -> docList.sortedWith( - compareBy( - { !it.isDir }, - { it.name } - ) + compareBy({ !it.isDir }, { it.name }) ) } }.flowOn(IO)