Replaced foreground operations by oneshot mode

This commit is contained in:
M66B
2019-03-05 10:34:00 +00:00
parent c5473b6f17
commit a0774c545f
10 changed files with 109 additions and 321 deletions

View File

@@ -302,11 +302,12 @@ public class FragmentFolders extends FragmentBase {
EntityOperation.sync(context, folder.id, true);
} else {
// Folder list
EntityAccount account = db.account().getAccount(aid);
if (account != null && !"connected".equals(account.state))
WorkerFolderSync.queue(aid);
else
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean enabled = prefs.getBoolean("enabled", true);
if (enabled)
ServiceSynchronize.reload(getContext(), "refresh folders");
else
ServiceSynchronize.process(context);
}
db.setTransactionSuccessful();