pull/83/head
kunfei 5 years ago
parent 427eac4313
commit 0aafde21e4
  1. 8
      app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt

@ -87,10 +87,14 @@ class ImportBookActivity : VMBaseActivity<ImportBookViewModel>(R.layout.activity
tv_path.text = tv_path.text.toString() + it.name + File.separator
}
}
doc?.listFiles()?.let {
importBookAdapter.setItems(it.toList())
val docList = arrayListOf<DocumentFile>()
doc?.listFiles()?.forEach {
if (it.isDirectory || it.name?.endsWith(".txt", true) == true) {
docList.add(it)
}
}
importBookAdapter.setItems(docList)
}
}
private fun selectImportFolder() {

Loading…
Cancel
Save