pull/94/head
kunfei 5 years ago
parent d40856f448
commit 5d83cf9726
  1. 6
      app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt
  2. 4
      app/src/main/res/values/strings.xml

@ -128,10 +128,10 @@ class OtherConfigFragment : PreferenceFragmentCompat(),
titleResource = R.string.select_folder titleResource = R.string.select_folder
items(resources.getStringArray(R.array.select_folder).toList()) { _, i -> items(resources.getStringArray(R.array.select_folder).toList()) { _, i ->
when (i) { when (i) {
1 -> { 0 -> {
removePref(PreferKey.downloadPath) removePref(PreferKey.downloadPath)
} }
2 -> { 1 -> {
try { try {
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE) val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
@ -141,7 +141,7 @@ class OtherConfigFragment : PreferenceFragmentCompat(),
toast(e.localizedMessage ?: "ERROR") toast(e.localizedMessage ?: "ERROR")
} }
} }
3 -> PermissionsCompat.Builder(this@OtherConfigFragment) 2 -> PermissionsCompat.Builder(this@OtherConfigFragment)
.addPermissions(*Permissions.Group.STORAGE) .addPermissions(*Permissions.Group.STORAGE)
.rationale(R.string.tip_perm_request_storage) .rationale(R.string.tip_perm_request_storage)
.onGranted { .onGranted {

@ -601,7 +601,7 @@
<string name="service_start">正在启动服务\n具体信息查看通知栏</string> <string name="service_start">正在启动服务\n具体信息查看通知栏</string>
<string name="default_path">默认路径</string> <string name="default_path">默认路径</string>
<string name="sys_folder_picker">系统文件夹选择器</string> <string name="sys_folder_picker">系统文件夹选择器</string>
<string name="app_folder_picker">自带选择器</string> <string name="app_folder_picker">自带选择器\n(Android10以上因权限限制可能无法使用)</string>
<string name="a10_permission_toast">Android10以上因为权限限制可能无法读取文件</string> <string name="a10_permission_toast">Android10以上因权限限制可能无法读写文件</string>
</resources> </resources>

Loading…
Cancel
Save