From e4d572f0cff9161209d076e2ed3efbe62ff1f308 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 19 Feb 2020 10:57:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt index 8042afbd8..27847522c 100644 --- a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt +++ b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt @@ -110,7 +110,8 @@ class FontSelectDialog : BaseDialogFragment(), @SuppressLint("DefaultLocale") private fun getFontFiles(uri: Uri) { launch(IO) { - val docItems = DocumentUtils.listFiles(App.INSTANCE, uri) + val doc = DocumentFile.fromTreeUri(App.INSTANCE, uri) ?: return@launch + val docItems = DocumentUtils.listFiles(App.INSTANCE, doc.uri) fontCacheFolder.listFiles()?.forEach { fontFile -> var contain = false for (item in docItems) {