mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Sync folders on add account
This commit is contained in:
parent
b637453ca7
commit
e24ce5ead6
3 changed files with 8 additions and 1 deletions
|
@ -368,6 +368,8 @@ public class FragmentGmail extends FragmentBase {
|
|||
folder.account = account.id;
|
||||
folder.id = db.folder().insertFolder(folder);
|
||||
EntityLog.log(context, "Gmail folder=" + folder.name + " type=" + folder.type);
|
||||
if (folder.synchronize)
|
||||
EntityOperation.sync(context, folder.id, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -493,6 +493,8 @@ public class FragmentOAuth extends FragmentBase {
|
|||
folder.account = account.id;
|
||||
folder.id = db.folder().insertFolder(folder);
|
||||
EntityLog.log(context, "OAuth folder=" + folder.name + " type=" + folder.type);
|
||||
if (folder.synchronize)
|
||||
EntityOperation.sync(context, folder.id, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -422,6 +422,9 @@ public class FragmentPop extends FragmentBase {
|
|||
inbox.keep_days = Integer.MAX_VALUE;
|
||||
inbox.initialize = 0;
|
||||
inbox.id = db.folder().insertFolder(inbox);
|
||||
|
||||
if (account.synchronize)
|
||||
EntityOperation.sync(context, inbox.id, false);
|
||||
}
|
||||
|
||||
EntityFolder drafts = db.folder().getFolderByType(account.id, EntityFolder.DRAFTS);
|
||||
|
@ -474,7 +477,7 @@ public class FragmentPop extends FragmentBase {
|
|||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, "save account");
|
||||
ServiceSynchronize.eval(context, "POP3");
|
||||
|
||||
if (!synchronize) {
|
||||
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
|
Loading…
Reference in a new issue