mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Small improvement
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user