Skip to content

Commit

Permalink
fix(compose): fix photoPicker not popping up when there is less than …
Browse files Browse the repository at this point in the history
…2 spaces available for media
  • Loading branch information
LucasGGamerM committed Sep 20, 2023
1 parent bb895c8 commit 2dd983c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,8 @@ private void openFilePicker(boolean photoPicker){
boolean usePhotoPicker=photoPicker && UiUtils.isPhotoPickerAvailable();
if(usePhotoPicker){
intent=new Intent(MediaStore.ACTION_PICK_IMAGES);
intent.putExtra(MediaStore.EXTRA_PICK_IMAGES_MAX, mediaViewController.getMaxAttachments()-mediaViewController.getMediaAttachmentsCount());
if(mediaViewController.getMaxAttachments()-mediaViewController.getMediaAttachmentsCount()>1)
intent.putExtra(MediaStore.EXTRA_PICK_IMAGES_MAX, mediaViewController.getMaxAttachments()-mediaViewController.getMediaAttachmentsCount());
}else{
intent=new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
Expand Down

0 comments on commit 2dd983c

Please sign in to comment.