From 4948e2b9ba3f7f14673eb6455709bc4fbccd0915 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 17 Oct 2018 08:18:14 +0000 Subject: [PATCH] Disable swipe for expanded messages --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 14d4bb9d..9e2d27b8 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -230,7 +230,10 @@ public class FragmentMessages extends FragmentEx { return 0; TupleMessageEx message = ((AdapterMessage) rvMessage.getAdapter()).getCurrentList().get(pos); - if (message == null || viewType != AdapterMessage.ViewType.THREAD || EntityFolder.OUTBOX.equals(message.folderType)) + if (message == null || + expanded.contains(message.id) || + viewType != AdapterMessage.ViewType.THREAD || + EntityFolder.OUTBOX.equals(message.folderType)) return 0; return makeMovementFlags(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT);