mirror of https://github.com/M66B/FairEmail.git
Make sure pending operations will be executed
This commit is contained in:
parent
fd54430cd9
commit
c3eb1c3127
|
@ -992,6 +992,15 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(ServiceSynchronize.this);
|
||||
lbm.registerReceiver(processFolder, f);
|
||||
|
||||
for (EntityFolder folder : folders.keySet())
|
||||
if (db.operation().getOperationCount(folder.id) > 0) {
|
||||
Intent intent = new Intent();
|
||||
intent.setType("account/" + account.id);
|
||||
intent.setAction(ServiceSynchronize.ACTION_PROCESS_OPERATIONS);
|
||||
intent.putExtra("folder", folder.id);
|
||||
lbm.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
// Keep alive alarm receiver
|
||||
BroadcastReceiver alarm = new BroadcastReceiver() {
|
||||
@Override
|
||||
|
@ -1985,6 +1994,7 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
f.addDataType("account/outbox");
|
||||
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(ServiceSynchronize.this);
|
||||
lbm.registerReceiver(outboxReceiver, f);
|
||||
|
||||
db.folder().setFolderState(outbox.id, "connected");
|
||||
db.folder().setFolderError(outbox.id, null);
|
||||
|
||||
|
|
Loading…
Reference in New Issue