Local folders cannot sync

This commit is contained in:
M66B
2021-10-04 19:45:05 +02:00
parent 815d6b8231
commit d9dd7a75f3
2 changed files with 9 additions and 2 deletions

View File

@@ -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();

View File

@@ -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