Fetch after move only if folder disabled or no idle

pull/162/head
M66B 5 years ago
parent 1c4e267fcb
commit 774f97819d

@ -720,22 +720,24 @@ class Core {
ifolder.expunge();
}
// Fetch appended/copied
try {
itarget.open(READ_WRITE);
// Fetch appended/copied when needed
if (!TextUtils.isEmpty(message.msgid) &&
(!folder.synchronize || !istore.hasCapability("IDLE")))
try {
Long uid = findUid(itarget, message.msgid, false);
if (uid != null) {
JSONArray fargs = new JSONArray();
fargs.put(uid);
onFetch(context, fargs, target, itarget, state);
itarget.open(READ_WRITE);
try {
Long uid = findUid(itarget, message.msgid, false);
if (uid != null) {
JSONArray fargs = new JSONArray();
fargs.put(uid);
onFetch(context, fargs, target, itarget, state);
}
} finally {
itarget.close();
}
} finally {
itarget.close();
} catch (Throwable ex) {
Log.w(ex);
}
} catch (Throwable ex) {
Log.w(ex);
}
// Delete junk contacts
if (EntityFolder.JUNK.equals(target.type)) {

Loading…
Cancel
Save