|
|
@ -9,6 +9,7 @@ import androidx.activity.result.contract.ActivityResultContracts |
|
|
|
import androidx.activity.viewModels |
|
|
|
import androidx.activity.viewModels |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.base.VMBaseActivity |
|
|
|
import io.legado.app.base.VMBaseActivity |
|
|
|
|
|
|
|
import io.legado.app.constant.AppLog |
|
|
|
import io.legado.app.constant.Theme |
|
|
|
import io.legado.app.constant.Theme |
|
|
|
import io.legado.app.databinding.ActivityTranslucenceBinding |
|
|
|
import io.legado.app.databinding.ActivityTranslucenceBinding |
|
|
|
import io.legado.app.help.IntentData |
|
|
|
import io.legado.app.help.IntentData |
|
|
@ -89,6 +90,7 @@ class HandleFileActivity : |
|
|
|
HandleFileContract.DIR -> kotlin.runCatching { |
|
|
|
HandleFileContract.DIR -> kotlin.runCatching { |
|
|
|
selectDocTree.launch() |
|
|
|
selectDocTree.launch() |
|
|
|
}.onFailure { |
|
|
|
}.onFailure { |
|
|
|
|
|
|
|
AppLog.put(getString(R.string.open_sys_dir_picker_error), it) |
|
|
|
toastOnUi(R.string.open_sys_dir_picker_error) |
|
|
|
toastOnUi(R.string.open_sys_dir_picker_error) |
|
|
|
checkPermissions { |
|
|
|
checkPermissions { |
|
|
|
FilePickerDialog.show( |
|
|
|
FilePickerDialog.show( |
|
|
@ -100,6 +102,7 @@ class HandleFileActivity : |
|
|
|
HandleFileContract.FILE -> kotlin.runCatching { |
|
|
|
HandleFileContract.FILE -> kotlin.runCatching { |
|
|
|
selectDoc.launch(typesOfExtensions(allowExtensions)) |
|
|
|
selectDoc.launch(typesOfExtensions(allowExtensions)) |
|
|
|
}.onFailure { |
|
|
|
}.onFailure { |
|
|
|
|
|
|
|
AppLog.put(getString(R.string.open_sys_dir_picker_error), it) |
|
|
|
toastOnUi(R.string.open_sys_dir_picker_error) |
|
|
|
toastOnUi(R.string.open_sys_dir_picker_error) |
|
|
|
FilePickerDialog.show( |
|
|
|
FilePickerDialog.show( |
|
|
|
supportFragmentManager, |
|
|
|
supportFragmentManager, |
|
|
|