Local folders cannot sync

pull/206/head
M66B 4 years ago
parent 815d6b8231
commit d9dd7a75f3

@ -561,7 +561,8 @@ public class ApplicationEx extends Application
if (inbox == null && "inbox".equalsIgnoreCase(folder.name))
folder.type = EntityFolder.INBOX;
if (!EntityFolder.USER.equals(folder.type) &&
if (!folder.local &&
!EntityFolder.USER.equals(folder.type) &&
!EntityFolder.SYSTEM.equals(folder.type)) {
EntityLog.log(context, "Repairing " + account.name + ":" + folder.type);
folder.setProperties();

@ -2165,7 +2165,7 @@ class Core {
EntityFolder folder = db.folder().getFolderByType(account.id, type);
if (folder == null) {
folder = db.folder().getFolderByName(account.id, fullName);
if (folder != null) {
if (folder != null && !folder.local) {
Log.e("Updated " + account.host + " " + type + "=" + fullName);
folder.type = type;
folder.setProperties();
@ -2831,6 +2831,12 @@ class Core {
" sync unseen=" + sync_unseen + " flagged=" + sync_flagged +
" delete unseen=" + delete_unseen + " kept=" + sync_kept);
if (folder.local) {
folder.synchronize = false;
db.folder().setFolderSynchronize(folder.id, folder.synchronize);
return;
}
db.folder().setFolderSyncState(folder.id, "syncing");
// Check uid validity

Loading…
Cancel
Save