pull/457/head
gedoor 4 years ago
parent 13741e54ed
commit 33a09ae46c
  1. 8
      app/src/main/java/io/legado/app/ui/filepicker/FilePicker.kt

@ -24,7 +24,7 @@ object FilePicker {
otherFun: ((action: String) -> Unit)? = null otherFun: ((action: String) -> Unit)? = null
) { ) {
val selectList = arrayListOf(activity.getString(R.string.sys_folder_picker)) val selectList = arrayListOf(activity.getString(R.string.sys_folder_picker))
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
selectList.add(activity.getString(R.string.app_folder_picker)) selectList.add(activity.getString(R.string.app_folder_picker))
} }
otherActions?.let { otherActions?.let {
@ -69,7 +69,7 @@ object FilePicker {
otherFun: ((action: String) -> Unit)? = null otherFun: ((action: String) -> Unit)? = null
) { ) {
val selectList = arrayListOf(fragment.getString(R.string.sys_folder_picker)) val selectList = arrayListOf(fragment.getString(R.string.sys_folder_picker))
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
selectList.add(fragment.getString(R.string.app_folder_picker)) selectList.add(fragment.getString(R.string.app_folder_picker))
} }
otherActions?.let { otherActions?.let {
@ -115,7 +115,7 @@ object FilePicker {
otherFun: ((action: String) -> Unit)? = null otherFun: ((action: String) -> Unit)? = null
) { ) {
val selectList = arrayListOf(activity.getString(R.string.sys_file_picker)) val selectList = arrayListOf(activity.getString(R.string.sys_file_picker))
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
selectList.add(activity.getString(R.string.app_file_picker)) selectList.add(activity.getString(R.string.app_file_picker))
} }
otherActions?.let { otherActions?.let {
@ -174,7 +174,7 @@ object FilePicker {
otherFun: ((action: String) -> Unit)? = null otherFun: ((action: String) -> Unit)? = null
) { ) {
val selectList = arrayListOf(fragment.getString(R.string.sys_file_picker)) val selectList = arrayListOf(fragment.getString(R.string.sys_file_picker))
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
selectList.add(fragment.getString(R.string.app_file_picker)) selectList.add(fragment.getString(R.string.app_file_picker))
} }
otherActions?.let { otherActions?.let {

Loading…
Cancel
Save