使用系统文件夹选择器出错时自动打开应用文件夹选择器,部分系统文件夹选择器被阉割了

pull/1434/head
gedoor 3 years ago
parent a9881308db
commit b693cb79d3
  1. 12
      app/src/main/java/io/legado/app/ui/document/HandleFileActivity.kt
  2. 1
      app/src/main/res/values-es-rES/strings.xml
  3. 1
      app/src/main/res/values-ja-rJP/strings.xml
  4. 1
      app/src/main/res/values-pt-rBR/strings.xml
  5. 1
      app/src/main/res/values-zh-rHK/strings.xml
  6. 1
      app/src/main/res/values-zh-rTW/strings.xml
  7. 1
      app/src/main/res/values-zh/strings.xml
  8. 1
      app/src/main/res/values/strings.xml

@ -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(

@ -904,5 +904,6 @@
<string name="font_scale_summary">当前字体大小:%.1f</string>
<string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
</resources>

@ -908,5 +908,6 @@
<string name="font_scale_summary">当前字体大小:%.1f</string>
<string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
</resources>

@ -908,5 +908,6 @@
<string name="font_scale_summary">当前字体大小:%.1f</string>
<string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
</resources>

@ -905,5 +905,6 @@
<string name="font_scale_summary">當前字亂大小:%.1f</string>
<string name="tts_speech_reduce">語速减</string>
<string name="tts_speech_add">語速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
</resources>

@ -907,5 +907,6 @@
<string name="font_scale_summary">當前字體大小:%.1f</string>
<string name="tts_speech_reduce">語速减</string>
<string name="tts_speech_add">語速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
</resources>

@ -907,5 +907,6 @@
<string name="font_scale_summary">当前字体大小:%.1f</string>
<string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
</resources>

@ -908,5 +908,6 @@
<string name="font_scale_summary">font scale:%.1f</string>
<string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
</resources>

Loading…
Cancel
Save