diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 8bc2b88133..2a54d99533 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -2314,12 +2314,14 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences EntityLog.log(this, EntityLog.Type.Account, account, account.name + " closing"); + // Cancel purge getMainHandler().removeCallbacks(purge); // Stop watching operations Log.i(account.name + " stop watching operations"); final TwoStateOwner _owner = cowner.value; - if (_owner != null) + if (_owner != null) { + cowner.value = null; getMainHandler().post(new RunnableEx("observe#stop") { @Override public void delegate() { @@ -2330,6 +2332,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences } } }); + } // Stop executing operations Log.i(account.name + " stop executing operations");