Implement single selection logic in custom image picker (#6341)
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:
Sonal Yadav 2025-06-07 19:39:47 +05:30 committed by GitHub
parent 06a613e855
commit f45f26e602
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 45 additions and 22 deletions

View file

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