mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 09:17:58 +00:00
Small improvement
This commit is contained in:
parent
36920e2404
commit
ab68b1f696
1 changed files with 3 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue