mirror of https://github.com/M66B/FairEmail.git
Skip archiving sent/trash/junk
This commit is contained in:
parent
d137cc8c85
commit
f6ee97ebbf
|
@ -587,6 +587,7 @@ public class FragmentMessages extends FragmentEx {
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putLong("account", account);
|
args.putLong("account", account);
|
||||||
args.putString("thread", thread);
|
args.putString("thread", thread);
|
||||||
|
args.putLong("id", id);
|
||||||
args.putString("folderType", folderType);
|
args.putString("folderType", folderType);
|
||||||
|
|
||||||
new SimpleTask<MessageTarget>() {
|
new SimpleTask<MessageTarget>() {
|
||||||
|
@ -594,6 +595,7 @@ public class FragmentMessages extends FragmentEx {
|
||||||
protected MessageTarget onLoad(Context context, Bundle args) {
|
protected MessageTarget onLoad(Context context, Bundle args) {
|
||||||
long account = args.getLong("account");
|
long account = args.getLong("account");
|
||||||
String thread = args.getString("thread");
|
String thread = args.getString("thread");
|
||||||
|
long id = args.getLong("id");
|
||||||
String folderType = args.getString("folderType");
|
String folderType = args.getString("folderType");
|
||||||
|
|
||||||
MessageTarget result = new MessageTarget();
|
MessageTarget result = new MessageTarget();
|
||||||
|
@ -606,9 +608,14 @@ public class FragmentMessages extends FragmentEx {
|
||||||
|
|
||||||
List<EntityMessage> messages = db.message().getMessageByThread(
|
List<EntityMessage> messages = db.message().getMessageByThread(
|
||||||
account, thread, threading ? null : id, null);
|
account, thread, threading ? null : id, null);
|
||||||
for (EntityMessage threaded : messages)
|
for (EntityMessage threaded : messages) {
|
||||||
if (!result.target.id.equals(threaded.folder))
|
EntityFolder folder = db.folder().getFolder(threaded.folder);
|
||||||
|
if (!result.target.id.equals(threaded.folder) &&
|
||||||
|
!EntityFolder.SENT.equals(folder.type) &&
|
||||||
|
!EntityFolder.TRASH.equals(folder.type) &&
|
||||||
|
!EntityFolder.JUNK.equals(folder.type))
|
||||||
result.ids.add(threaded.id);
|
result.ids.add(threaded.id);
|
||||||
|
}
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
db.setTransactionSuccessful();
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue