From 04dd7fc0cd92c2db1053886998297046a09430a5 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 9 Sep 2019 10:07:23 +0200 Subject: [PATCH] Revert "Add photos inline" This reverts commit ab5d7d6c22c5a0ae492d7be140d099cc3db4ab1f. --- .../java/eu/faircode/email/FragmentCompose.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index eea82e36fd..0b07f7c4a7 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -1163,9 +1163,9 @@ public class FragmentCompose extends FragmentBase { case REQUEST_TAKE_PHOTO: if (resultCode == RESULT_OK) if (requestCode == REQUEST_TAKE_PHOTO) - onAddMedia(new Intent().setData(photoURI), true); + onAddMedia(new Intent().setData(photoURI)); else if (data != null) - onAddMedia(data, false); + onAddMedia(data); break; case REQUEST_ENCRYPT: if (resultCode == RESULT_OK && data != null) { @@ -1346,21 +1346,18 @@ public class FragmentCompose extends FragmentBase { }.execute(this, args, "compose:attachment:add"); } - private void onAddMedia(Intent data, boolean image) { - Log.i("Add media data=" + data); - Log.logExtras(data); - + private void onAddMedia(Intent data) { ClipData clipData = data.getClipData(); if (clipData == null) { Uri uri = data.getData(); if (uri != null) - onAddAttachment(uri, image); + onAddAttachment(uri, false); } else { for (int i = 0; i < clipData.getItemCount(); i++) { ClipData.Item item = clipData.getItemAt(i); Uri uri = item.getUri(); if (uri != null) - onAddAttachment(uri, image); + onAddAttachment(uri, false); } } }