From b693cb79d39466aa89678d0bba313893a764a55b Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 13 Nov 2021 19:26:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=B3=BB=E7=BB=9F=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E9=80=89=E6=8B=A9=E5=99=A8=E5=87=BA=E9=94=99?= =?UTF-8?q?=E6=97=B6=E8=87=AA=E5=8A=A8=E6=89=93=E5=BC=80=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=E9=80=89=E6=8B=A9=E5=99=A8,?= =?UTF-8?q?=E9=83=A8=E5=88=86=E7=B3=BB=E7=BB=9F=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=99=A8=E8=A2=AB=E9=98=89=E5=89=B2=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/document/HandleFileActivity.kt | 12 +++++++++++- app/src/main/res/values-es-rES/strings.xml | 1 + app/src/main/res/values-ja-rJP/strings.xml | 1 + app/src/main/res/values-pt-rBR/strings.xml | 1 + app/src/main/res/values-zh-rHK/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values-zh/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 8 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/document/HandleFileActivity.kt b/app/src/main/java/io/legado/app/ui/document/HandleFileActivity.kt index 52715eb5a..10916635a 100644 --- a/app/src/main/java/io/legado/app/ui/document/HandleFileActivity.kt +++ b/app/src/main/java/io/legado/app/ui/document/HandleFileActivity.kt @@ -79,7 +79,17 @@ class HandleFileActivity : alert(title) { items(selectList) { _, item, _ -> when (item.value) { - HandleFileContract.DIR -> selectDocTree.launch(null) + HandleFileContract.DIR -> kotlin.runCatching { + selectDocTree.launch(null) + }.onFailure { + toastOnUi(R.string.open_sys_dir_picker_error) + checkPermissions { + FilePickerDialog.show( + supportFragmentManager, + mode = HandleFileContract.DIR + ) + } + } HandleFileContract.FILE -> selectDoc.launch(typesOfExtensions(allowExtensions)) 10 -> checkPermissions { FilePickerDialog.show( diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 8c21d2461..dd6a2d5e8 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -904,5 +904,6 @@ 当前字体大小:%.1f 语速减 语速加 + 打开系统文件夹选择器出错,自动打开应用文件夹选择器 diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml index 9a780a16d..4ac6c352f 100644 --- a/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/src/main/res/values-ja-rJP/strings.xml @@ -908,5 +908,6 @@ 当前字体大小:%.1f 语速减 语速加 + 打开系统文件夹选择器出错,自动打开应用文件夹选择器 diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 6318b9952..ecc78d85d 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -908,5 +908,6 @@ 当前字体大小:%.1f 语速减 语速加 + 打开系统文件夹选择器出错,自动打开应用文件夹选择器 diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index fc8c09771..3ce737859 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -905,5 +905,6 @@ 當前字亂大小:%.1f 語速减 語速加 + 打开系统文件夹选择器出错,自动打开应用文件夹选择器 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index b11a9b323..ed32c1f1e 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -907,5 +907,6 @@ 當前字體大小:%.1f 語速减 語速加 + 打开系统文件夹选择器出错,自动打开应用文件夹选择器 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 1e966bab3..776beec37 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -907,5 +907,6 @@ 当前字体大小:%.1f 语速减 语速加 + 打开系统文件夹选择器出错,自动打开应用文件夹选择器 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 967010a8e..d32a0631b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -908,5 +908,6 @@ font scale:%.1f 语速减 语速加 + 打开系统文件夹选择器出错,自动打开应用文件夹选择器