mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-29 11:15:51 +00:00
noop after append
This commit is contained in:
parent
3314ac0cc2
commit
0b444975e7
1 changed files with 18 additions and 0 deletions
|
@ -575,6 +575,17 @@ class Core {
|
|||
return uid;
|
||||
}
|
||||
|
||||
private static void noop(IMAPFolder ifolder) throws MessagingException {
|
||||
// https://tools.ietf.org/html/rfc3501#section-6.3.11
|
||||
ifolder.doCommand(new IMAPFolder.ProtocolCommand() {
|
||||
@Override
|
||||
public Object doCommand(IMAPProtocol protocol) throws ProtocolException {
|
||||
protocol.noop();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void onSeen(Context context, JSONArray jargs, EntityFolder folder, EntityMessage message, IMAPFolder ifolder) throws MessagingException, JSONException {
|
||||
// Mark message (un)seen
|
||||
DB db = DB.getInstance(context);
|
||||
|
@ -745,6 +756,9 @@ class Core {
|
|||
// Add message
|
||||
ifolder.appendMessages(new Message[]{imessage});
|
||||
|
||||
// Send no operation
|
||||
noop(ifolder);
|
||||
|
||||
// Delete previous (external) version
|
||||
if (message.uid != null) {
|
||||
db.message().setMessageUid(message.id, null);
|
||||
|
@ -845,7 +859,11 @@ class Core {
|
|||
icopies.add(icopy);
|
||||
}
|
||||
|
||||
// Add message
|
||||
itarget.appendMessages(icopies.toArray(new Message[0]));
|
||||
|
||||
// Send no operation
|
||||
noop(itarget);
|
||||
} else {
|
||||
for (Message imessage : map.keySet()) {
|
||||
Log.i("Move seen=" + seen + " unflag=" + unflag + " flags=" + imessage.getFlags());
|
||||
|
|
Loading…
Reference in a new issue