File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
app/src/main/java/fr/free/nrw/commons/filepicker Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -263,17 +263,8 @@ object FilePicker : Constants {
263263 ) {
264264 if (result.resultCode == Activity .RESULT_OK && ! isPhoto(result.data)) {
265265 try {
266- val photoPath = result.data?.data
267- val photoFile = PickedFiles .pickedExistingPicture(activity, photoPath!! )
268- callbacks.onImagesPicked(
269- singleFileList(photoFile),
270- ImageSource .DOCUMENTS ,
271- restoreType(activity)
272- )
273-
274- if (configuration(activity).shouldCopyPickedImagesToPublicGalleryAppFolder()) {
275- PickedFiles .copyFilesInSeparateThread(activity, singleFileList(photoFile))
276- }
266+ val files = getFilesFromGalleryPictures(result.data, activity)
267+ callbacks.onImagesPicked(files, ImageSource .DOCUMENTS , restoreType(activity))
277268 } catch (e: Exception ) {
278269 e.printStackTrace()
279270 callbacks.onImagePickerError(e, ImageSource .DOCUMENTS , restoreType(activity))
You can’t perform that action at this time.
0 commit comments