From 4eb1988427db0116ce4e8e0c6024dd1e1129d3dd Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 12 Oct 2018 13:53:57 +0000 Subject: [PATCH] Move somewhere --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 4 +++- 1 file changed, 3 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 df5257dc..15b4971c 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -270,6 +270,8 @@ public class FragmentMessages extends FragmentEx { target = db.folder().getFolderByType(message.account, EntityFolder.ARCHIVE); if (direction == ItemTouchHelper.LEFT || target == null) target = db.folder().getFolderByType(message.account, EntityFolder.TRASH); + if (target == null) + target = db.folder().getFolderByType(message.account, EntityFolder.INBOX); } db.message().setMessageUiHide(message.id, true); @@ -279,7 +281,7 @@ public class FragmentMessages extends FragmentEx { db.endTransaction(); } - Log.i(Helper.TAG, "Move id=" + id + " target=" + target); + Log.i(Helper.TAG, "Move id=" + id + " target=" + target.name); return new String[]{target.name, target.display == null ? target.name : target.display}; }