|
|
@ -465,7 +465,7 @@ 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 ||
|
|
|
|
if (message == null || message.uid == null ||
|
|
|
|
(values.containsKey("expanded") && values.get("expanded").contains(message.id)) ||
|
|
|
|
(values.containsKey("expanded") && values.get("expanded").contains(message.id)) ||
|
|
|
|
EntityFolder.DRAFTS.equals(message.folderType) ||
|
|
|
|
EntityFolder.DRAFTS.equals(message.folderType) ||
|
|
|
|
EntityFolder.OUTBOX.equals(message.folderType))
|
|
|
|
EntityFolder.OUTBOX.equals(message.folderType))
|
|
|
@ -1826,20 +1826,21 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
|
|
|
|
|
|
|
boolean trashable = false;
|
|
|
|
boolean trashable = false;
|
|
|
|
boolean archivable = false;
|
|
|
|
boolean archivable = false;
|
|
|
|
for (EntityMessage message : messages) {
|
|
|
|
for (EntityMessage message : messages)
|
|
|
|
EntityFolder folder = db.folder().getFolder(message.folder);
|
|
|
|
if (message.uid != null) {
|
|
|
|
if (!EntityFolder.DRAFTS.equals(folder.type) &&
|
|
|
|
EntityFolder folder = db.folder().getFolder(message.folder);
|
|
|
|
!EntityFolder.OUTBOX.equals(folder.type) &&
|
|
|
|
if (!EntityFolder.DRAFTS.equals(folder.type) &&
|
|
|
|
// allow sent
|
|
|
|
!EntityFolder.OUTBOX.equals(folder.type) &&
|
|
|
|
!EntityFolder.TRASH.equals(folder.type) &&
|
|
|
|
// allow sent
|
|
|
|
!EntityFolder.JUNK.equals(folder.type))
|
|
|
|
!EntityFolder.TRASH.equals(folder.type) &&
|
|
|
|
trashable = true;
|
|
|
|
!EntityFolder.JUNK.equals(folder.type))
|
|
|
|
if (!EntityFolder.isOutgoing(folder.type) &&
|
|
|
|
trashable = true;
|
|
|
|
!EntityFolder.TRASH.equals(folder.type) &&
|
|
|
|
if (!EntityFolder.isOutgoing(folder.type) &&
|
|
|
|
!EntityFolder.JUNK.equals(folder.type) &&
|
|
|
|
!EntityFolder.TRASH.equals(folder.type) &&
|
|
|
|
!EntityFolder.ARCHIVE.equals(folder.type))
|
|
|
|
!EntityFolder.JUNK.equals(folder.type) &&
|
|
|
|
archivable = true;
|
|
|
|
!EntityFolder.ARCHIVE.equals(folder.type))
|
|
|
|
}
|
|
|
|
archivable = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return new Boolean[]{trashable, archivable};
|
|
|
|
return new Boolean[]{trashable, archivable};
|
|
|
|
}
|
|
|
|
}
|
|
|
|