mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-22 07:42:52 +00:00
Prevent duplicate operations
This commit is contained in:
parent
ca48f07cf1
commit
28800cb527
1 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue