mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-03 08:13:55 +01:00
Implement single selection logic in custom image picker (#6341)
Some checks are pending
Android CI / Run tests and generate APK (push) Waiting to run
Some checks are pending
Android CI / Run tests and generate APK (push) Waiting to run
* build failure cause * Fix image selector logic in custom picker
This commit is contained in:
parent
06a613e855
commit
f45f26e602
7 changed files with 45 additions and 22 deletions
|
|
@ -253,13 +253,14 @@ class ContributionController @Inject constructor(@param:Named("default_preferenc
|
|||
*/
|
||||
fun initiateCustomGalleryPickWithPermission(
|
||||
activity: Activity,
|
||||
resultLauncher: ActivityResultLauncher<Intent>
|
||||
resultLauncher: ActivityResultLauncher<Intent>,
|
||||
singleSelection: Boolean = false
|
||||
) {
|
||||
setPickerConfiguration(activity, true)
|
||||
|
||||
checkPermissionsAndPerformAction(
|
||||
activity,
|
||||
{ openCustomSelector(activity, resultLauncher, 0) },
|
||||
{ FilePicker.openCustomSelector(activity, resultLauncher, 0, singleSelection) },
|
||||
R.string.storage_permission_title,
|
||||
R.string.write_storage_permission_rationale,
|
||||
*PERMISSIONS_STORAGE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue