From a2c3e9ad57722b68679908b872966f18cef42714 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 21 Jan 2021 15:41:27 +0100 Subject: [PATCH] Fixed skipping polls --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 7b45948528..3dbfa79712 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -899,7 +899,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences private void onAlarm(Intent intent) { schedule(this, true); - updateNetworkState(null, "alarm"); Bundle command = new Bundle(); command.putString("name", "eval"); @@ -2177,6 +2176,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences private void post(Bundle command) { EntityLog.log(ServiceSynchronize.this, "### command " + TextUtils.join(" ", Log.getExtras(command))); + + if (command.getBoolean("sync")) + lastNetworkState = ConnectionHelper.getNetworkState(ServiceSynchronize.this); + post(command, lastNetworkState, lastAccountStates); }