From 5705a09b5584b78d7800e6314ccb7e4539baebb2 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 23 Oct 2021 21:19:43 +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 --- .../io/legado/app/ui/book/local/ImportBookAdapter.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/local/ImportBookAdapter.kt b/app/src/main/java/io/legado/app/ui/book/local/ImportBookAdapter.kt index 8180f1e7c..8db201102 100644 --- a/app/src/main/java/io/legado/app/ui/book/local/ImportBookAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/local/ImportBookAdapter.kt @@ -53,11 +53,11 @@ class ImportBookAdapter(context: Context, val callBack: CallBack) : tvTag.text = item.name.substringAfterLast(".") tvSize.text = StringUtils.toSize(item.size) tvDate.text = AppConst.dateFormat.format(item.date) - cbSelect.isChecked = selectedUris.contains(item.uri.toString()) + cbSelect.isChecked = selectedUris.contains(item.toString()) } tvName.text = item.name } else { - cbSelect.isChecked = selectedUris.contains(item.uri.toString()) + cbSelect.isChecked = selectedUris.contains(item.toString()) } } } @@ -68,10 +68,10 @@ class ImportBookAdapter(context: Context, val callBack: CallBack) : if (it.isDir) { callBack.nextDoc(it.uri) } else if (!bookFileNames.contains(it.name)) { - if (!selectedUris.contains(it.uri.toString())) { - selectedUris.add(it.uri.toString()) + if (!selectedUris.contains(it.toString())) { + selectedUris.add(it.toString()) } else { - selectedUris.remove(it.uri.toString()) + selectedUris.remove(it.toString()) } notifyItemChanged(holder.layoutPosition, true) callBack.upCountView()