feat: 优化代码

pull/105/head
kunfei 5 years ago
parent 6fe01e336c
commit 817de1ce89
  1. 4
      app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt

@ -71,12 +71,16 @@ class FontSelectDialog : BaseDialogFragment(),
if (fontPath.isNullOrEmpty()) {
openFolder()
} else {
if (fontPath.isContentPath()) {
val doc = DocumentFile.fromTreeUri(requireContext(), Uri.parse(fontPath))
if (doc?.canRead() == true) {
getFontFiles(doc)
} else {
openFolder()
}
} else {
getFontFilesByPermission(fontPath)
}
}
}

Loading…
Cancel
Save