diff --git a/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt b/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt index ad6b67419..43cfd95a5 100644 --- a/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt @@ -96,6 +96,9 @@ class ImportBookActivity : VMBaseActivity(R.layout.activity lastDoc = doc path = path + doc.name + File.separator } + tv_path.text = path + importBookAdapter.selectedUris.clear() + val docList = arrayListOf() lastDoc.listFiles().forEach { if (it.isDirectory && it.name?.startsWith(".") == false) { @@ -105,8 +108,6 @@ class ImportBookActivity : VMBaseActivity(R.layout.activity } } docList.sortWith(compareBy({ !it.isDirectory }, { it.name })) - tv_path.text = path - importBookAdapter.selectedUris.clear() importBookAdapter.setItems(docList) } }