From 3a2a369aff390286015146d3c2ee71661ba5da68 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 26 Apr 2019 13:35:10 +0200 Subject: [PATCH] Allow manual sync when polling --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 3 ++- 1 file changed, 2 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 c86221ac22..3a0982abe2 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1312,7 +1312,8 @@ public class ServiceSynchronize extends LifecycleService { static void process(Context context) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); boolean enabled = prefs.getBoolean("enabled", true); - if (!enabled) + int pollInterval = prefs.getInt("poll_interval", 0); + if (!enabled || pollInterval > 0) onshot(context); }