|
|
@ -335,19 +335,21 @@ public class FragmentFolders extends FragmentBase {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
db.beginTransaction();
|
|
|
|
db.beginTransaction();
|
|
|
|
|
|
|
|
|
|
|
|
if (aid < 0) {
|
|
|
|
List<EntityFolder> folders;
|
|
|
|
// Unified inbox
|
|
|
|
if (aid < 0)
|
|
|
|
List<EntityFolder> folders = db.folder().getFoldersUnified(null, true);
|
|
|
|
folders = db.folder().getFoldersUnified(null, true);
|
|
|
|
for (EntityFolder folder : folders) {
|
|
|
|
else
|
|
|
|
EntityOperation.sync(context, folder.id, true);
|
|
|
|
folders = db.folder().getSynchronizingFolders(aid);
|
|
|
|
|
|
|
|
|
|
|
|
if (folder.account == null)
|
|
|
|
for (EntityFolder folder : folders) {
|
|
|
|
outbox = true;
|
|
|
|
EntityOperation.sync(context, folder.id, true);
|
|
|
|
else {
|
|
|
|
|
|
|
|
EntityAccount account = db.account().getAccount(folder.account);
|
|
|
|
if (folder.account == null)
|
|
|
|
if (account != null && !"connected".equals(account.state))
|
|
|
|
outbox = true;
|
|
|
|
now = false;
|
|
|
|
else {
|
|
|
|
}
|
|
|
|
EntityAccount account = db.account().getAccount(folder.account);
|
|
|
|
|
|
|
|
if (account != null && !"connected".equals(account.state))
|
|
|
|
|
|
|
|
now = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -356,10 +358,7 @@ public class FragmentFolders extends FragmentBase {
|
|
|
|
db.endTransaction();
|
|
|
|
db.endTransaction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (aid < 0)
|
|
|
|
ServiceSynchronize.eval(context, "refresh/folders");
|
|
|
|
ServiceSynchronize.eval(context, "refresh/folders");
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
ServiceSynchronize.reload(context, aid, "refresh/folders");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (outbox)
|
|
|
|
if (outbox)
|
|
|
|
ServiceSend.start(context);
|
|
|
|
ServiceSend.start(context);
|
|
|
|