mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 19:34:15 +01:00
Sync folders on add account
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user