diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 2142c75af2..44d357460d 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -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)