mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 00:23:09 +02:00
Replaced foreground operations by oneshot mode
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user