From 6cede265fba9d0e53e3d565e18831b5b57a1beac Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 8 Aug 2020 17:34:15 +0200 Subject: [PATCH] Increased sentitivity swipe up to move --- .../java/eu/faircode/email/FragmentMessages.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 006bfd96dd..e0fefecbdb 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -1361,13 +1361,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. if (offset == 0) triggered = false; - else if (!triggered && - Math.abs(offset * DEFAULT_TOUCH_DRAG_MOVE_RATIO_FWD) > height / 4) { - triggered = true; - - if (offset > 0) + else if (!triggered) { + float dx = Math.abs(offset * DEFAULT_TOUCH_DRAG_MOVE_RATIO_FWD); + if (offset > 0 && dx > height / 4) { + triggered = true; handleAutoClose(); - else { + } + + if (offset < 0 && dx > height / 8) { + triggered = true; + Bundle args = new Bundle(); args.putString("title", getString(R.string.title_move_to_folder)); args.putLong("account", account);