1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-21 23:32:51 +00:00

Prevent duplicate operations

This commit is contained in:
M66B 2024-11-17 15:44:37 +01:00
parent ca48f07cf1
commit 28800cb527

View file

@ -2190,8 +2190,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
cowner.value.start();
db.operation().liveOperations(account.id).observe(cowner.value, new Observer<List<TupleOperationEx>>() {
private DutyCycle dc = new DutyCycle(account.name + " operations");
private List<Long> handling = new ArrayList<>();
private final DutyCycle dc = new DutyCycle(account.name + " operations");
private final List<Long> handling = new ArrayList<>();
private final Map<TupleOperationEx.PartitionKey, List<TupleOperationEx>> partitions = new HashMap<>();
private final PowerManager.WakeLock wlOperations = pm.newWakeLock(
@ -2210,7 +2210,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
added.get(op.folder).add(op);
}
}
handling = all;
handling.clear();
handling.addAll(all);
if (empty_pool && istore instanceof IMAPStore) {
getMainHandler().removeCallbacks(purge);