|
|
@ -162,6 +162,7 @@ class ImportBookActivity : VMBaseActivity<ImportBookViewModel>(R.layout.activity |
|
|
|
val docList = arrayListOf<DocItem>() |
|
|
|
val docList = arrayListOf<DocItem>() |
|
|
|
File(path).listFiles()?.forEach { |
|
|
|
File(path).listFiles()?.forEach { |
|
|
|
if (it.isDirectory) { |
|
|
|
if (it.isDirectory) { |
|
|
|
|
|
|
|
if (!it.name.startsWith(".")) |
|
|
|
docList.add( |
|
|
|
docList.add( |
|
|
|
DocItem( |
|
|
|
DocItem( |
|
|
|
it.name, |
|
|
|
it.name, |
|
|
@ -183,6 +184,7 @@ class ImportBookActivity : VMBaseActivity<ImportBookViewModel>(R.layout.activity |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
docList.sortWith(compareBy({ !it.isDir }, { it.name })) |
|
|
|
adapter.setData(docList) |
|
|
|
adapter.setData(docList) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|