优化
This commit is contained in:
@@ -182,7 +182,7 @@ class ImportBookActivity : BaseImportBookActivity<ImportBookViewModel>(),
|
|||||||
private fun initRootPath(rootUri: Uri) {
|
private fun initRootPath(rootUri: Uri) {
|
||||||
kotlin.runCatching {
|
kotlin.runCatching {
|
||||||
val doc = DocumentFile.fromTreeUri(this, rootUri)
|
val doc = DocumentFile.fromTreeUri(this, rootUri)
|
||||||
if (doc == null || doc.name.isNullOrEmpty()) {
|
if (doc == null || doc.name.isNullOrEmpty() || !doc.isDirectory) {
|
||||||
binding.tvEmptyMsg.visible()
|
binding.tvEmptyMsg.visible()
|
||||||
selectFolder.launch()
|
selectFolder.launch()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user