Fixed adding photos on some Android versions/variants

This commit is contained in:
M66B 2020-03-27 14:44:22 +01:00
parent a80c3a953f
commit ee62bce462
1 changed files with 7 additions and 2 deletions

View File

@ -1589,13 +1589,18 @@ public class FragmentCompose extends FragmentBase {
onAddImage(data.getBundleExtra("args").getBoolean("photo"));
break;
case REQUEST_IMAGE_FILE:
case REQUEST_TAKE_PHOTO:
if (resultCode == RESULT_OK && data != null) {
Uri uri = (requestCode == REQUEST_TAKE_PHOTO ? photoURI : data.getData());
Uri uri = data.getData();
if (uri != null)
onAddImageFile(uri);
}
break;
case REQUEST_TAKE_PHOTO:
if (resultCode == RESULT_OK) {
if (photoURI != null)
onAddImageFile(photoURI);
}
break;
case REQUEST_ATTACHMENT:
case REQUEST_RECORD_AUDIO:
if (resultCode == RESULT_OK && data != null)