Disable swipe for expanded messages

This commit is contained in:
M66B 2018-10-17 08:18:14 +00:00
parent 8a1f1a14a7
commit 4948e2b9ba
1 changed files with 4 additions and 1 deletions

View File

@ -230,7 +230,10 @@ public class FragmentMessages extends FragmentEx {
return 0; return 0;
TupleMessageEx message = ((AdapterMessage) rvMessage.getAdapter()).getCurrentList().get(pos); 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 0;
return makeMovementFlags(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT); return makeMovementFlags(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT);