From 5832ab8b20cdb4eda212b55681b7f80b6023eb59 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 2 Nov 2021 09:19:12 +0100 Subject: [PATCH] Revert "Added long press to force image dialog" This reverts commit c1d2ef0197a114f58b0823eeba3dc50b1bc18466. --- .../java/eu/faircode/email/FragmentCompose.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index dce2cfc305..0c138230a5 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -881,10 +881,10 @@ public class FragmentCompose extends FragmentBase { onActionRecordAudio(); return true; } else if (action == R.id.menu_take_photo) { - onActionImage(true, false); + onActionImage(true); return true; } else if (action == R.id.menu_image) { - onActionImage(false, false); + onActionImage(false); return true; } else if (action == R.id.menu_attachment) { onActionAttachment(); @@ -1657,14 +1657,6 @@ public class FragmentCompose extends FragmentBase { else bottom_navigation.getMenu().findItem(R.id.action_send).setTitle(R.string.title_send); - media_bar.findViewById(R.id.menu_image).setOnLongClickListener(new View.OnLongClickListener() { - @Override - public boolean onLongClick(View v) { - onActionImage(false, true); - return true; - } - }); - bottom_navigation.findViewById(R.id.action_send).setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { @@ -2323,10 +2315,10 @@ public class FragmentCompose extends FragmentBase { } } - private void onActionImage(boolean photo, boolean force) { + private void onActionImage(boolean photo) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); boolean image_dialog = prefs.getBoolean("image_dialog", true); - if (image_dialog || force) { + if (image_dialog) { Helper.hideKeyboard(view); Bundle args = new Bundle();