mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 01:06:04 +00:00
Check swipe target
This commit is contained in:
parent
94ede60603
commit
3980cd6dd3
1 changed files with 4 additions and 3 deletions
|
@ -338,7 +338,10 @@ public class FragmentMessages extends FragmentEx {
|
|||
EntityMessage message = db.message().getMessage(id);
|
||||
EntityFolder folder = db.folder().getFolder(message.folder);
|
||||
|
||||
if (swipeTarget < 0 || direction == ItemTouchHelper.LEFT) {
|
||||
if (swipeTarget >= 0 && direction == ItemTouchHelper.RIGHT)
|
||||
target = db.folder().getFolder(swipeTarget);
|
||||
|
||||
if (target == null || !target.account.equals((message.account))) {
|
||||
if (EntityFolder.ARCHIVE.equals(folder.type) || EntityFolder.TRASH.equals(folder.type))
|
||||
target = db.folder().getFolderByType(message.account, EntityFolder.INBOX);
|
||||
else {
|
||||
|
@ -349,8 +352,6 @@ public class FragmentMessages extends FragmentEx {
|
|||
if (target == null)
|
||||
target = db.folder().getFolderByType(message.account, EntityFolder.INBOX);
|
||||
}
|
||||
} else {
|
||||
target = db.folder().getFolder(swipeTarget);
|
||||
}
|
||||
|
||||
result.target = target.name;
|
||||
|
|
Loading…
Reference in a new issue