mirror of https://github.com/M66B/FairEmail.git
Fixed fetch on move
This commit is contained in:
parent
ddd85f4244
commit
8aee5a6706
|
@ -867,9 +867,14 @@ class Core {
|
||||||
ifolder.expunge();
|
ifolder.expunge();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean fetch =
|
||||||
|
(!target.synchronize || !"connected".equals(target.state) ||
|
||||||
|
target.poll || !istore.hasCapability("IDLE"));
|
||||||
|
|
||||||
// Fetch appended/copied when needed
|
// Fetch appended/copied when needed
|
||||||
if (draft || !target.synchronize || target.poll || !istore.hasCapability("IDLE"))
|
if (draft || fetch)
|
||||||
try {
|
try {
|
||||||
|
Log.i(target.name + " moved message fetch=" + fetch);
|
||||||
itarget.open(READ_WRITE);
|
itarget.open(READ_WRITE);
|
||||||
|
|
||||||
for (EntityMessage message : map.values())
|
for (EntityMessage message : map.values())
|
||||||
|
@ -892,7 +897,7 @@ class Core {
|
||||||
icopy.setFlag(Flags.Flag.DRAFT, EntityFolder.DRAFTS.equals(target.type));
|
icopy.setFlag(Flags.Flag.DRAFT, EntityFolder.DRAFTS.equals(target.type));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!target.synchronize || !istore.hasCapability("IDLE")) {
|
if (fetch) {
|
||||||
JSONArray fargs = new JSONArray();
|
JSONArray fargs = new JSONArray();
|
||||||
fargs.put(uid);
|
fargs.put(uid);
|
||||||
onFetch(context, fargs, target, istore, itarget, state);
|
onFetch(context, fargs, target, istore, itarget, state);
|
||||||
|
|
Loading…
Reference in New Issue