1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-01 03:45:10 +00:00

Allow manual sync when polling

This commit is contained in:
M66B 2019-04-26 13:35:10 +02:00
parent 8082fffbf7
commit 3a2a369aff

View file

@ -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);
}