mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 06:01:12 +00:00
Prevent get/set seen race condition
This commit is contained in:
parent
bd586f7370
commit
c588640c7b
2 changed files with 3 additions and 8 deletions
Binary file not shown.
|
@ -490,6 +490,9 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
// Process pending operations
|
||||
processOperations(folder, isession, istore, ifolder);
|
||||
|
||||
// Listen for new and deleted messages
|
||||
ifolder.addMessageCountListener(new MessageCountAdapter() {
|
||||
@Override
|
||||
|
@ -715,14 +718,6 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
lbm.registerReceiver(processFolder, f);
|
||||
|
||||
try {
|
||||
// Process pending folder operations
|
||||
Log.i(Helper.TAG, "listen process folder");
|
||||
for (final EntityFolder folder : folders.keySet())
|
||||
if (!EntityFolder.OUTBOX.equals(folder.type))
|
||||
lbm.sendBroadcast(new Intent(ACTION_PROCESS_OPERATIONS)
|
||||
.setType("account/" + account.id)
|
||||
.putExtra("folder", folder.id));
|
||||
|
||||
// Keep store alive
|
||||
while (state.running && istore.isConnected()) {
|
||||
Log.i(Helper.TAG, "Checking folders");
|
||||
|
|
Loading…
Reference in a new issue