1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 09:17:58 +00:00

Small improvement

This commit is contained in:
M66B 2019-02-14 13:46:45 +00:00
parent 36920e2404
commit ab68b1f696

View file

@ -33,10 +33,11 @@ public class ServiceExternal extends IntentService {
else if (ACTION_DISABLE.equals(intent.getAction()))
enabled = false;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean previous = prefs.getBoolean("enabled", true);
if (enabled != null) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
prefs.edit().putBoolean("schedule", false).apply();
boolean previous = prefs.getBoolean("enabled", true);
if (!enabled.equals(previous)) {
prefs.edit().putBoolean("enabled", enabled).apply();
ServiceSynchronize.reload(this, "external");