Individual account management - to be tested

This commit is contained in:
M66B
2019-12-07 15:14:35 +01:00
parent 35602ef17c
commit 2591dc9011
33 changed files with 378 additions and 717 deletions

View File

@@ -76,7 +76,7 @@ public class ServiceExternal extends Service {
String action = intent.getAction();
if (ACTION_POLL.equals(action)) {
ServiceSynchronize.process(this, true);
// TODO: sync all
return START_NOT_STICKY;
}
@@ -97,7 +97,7 @@ public class ServiceExternal extends Service {
boolean previous = prefs.getBoolean("enabled", true);
if (!enabled.equals(previous)) {
prefs.edit().putBoolean("enabled", enabled).apply();
ServiceSynchronize.reload(this, "external");
ServiceSynchronize.eval(this, false, "external");
}
} else {
final Context context = getApplicationContext();
@@ -108,7 +108,7 @@ public class ServiceExternal extends Service {
EntityAccount account = db.account().getAccount(accountName);
if (account != null) {
db.account().setAccountSynchronize(account.id, enabled);
ServiceSynchronize.reload(context, "account enabled=" + enabled);
ServiceSynchronize.eval(context, false, "account enabled=" + enabled);
}
}
});