mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-05 04:19:21 +01:00
Removed special folder case
Some providers make all folders subfolder of the inbox
This commit is contained in:
@@ -1949,10 +1949,6 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
}
|
||||
}
|
||||
|
||||
// Special case
|
||||
if (type == null && fullName.startsWith("INBOX" + separator))
|
||||
type = EntityFolder.INBOX_SUB;
|
||||
|
||||
if (selectable) {
|
||||
int level = EntityFolder.getLevel(separator, fullName);
|
||||
EntityFolder folder = db.folder().getFolderByName(account.id, fullName);
|
||||
@@ -1971,8 +1967,9 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
} else {
|
||||
Log.i(Helper.TAG, folder.name + " exists");
|
||||
db.folder().setFolderLevel(folder.id, level);
|
||||
if (EntityFolder.USER.equals(folder.type) &&
|
||||
(EntityFolder.INBOX_SUB.equals(type) || EntityFolder.SYSTEM.equals(type)))
|
||||
if ("Inbox_sub".equals(folder.type))
|
||||
db.folder().setFolderType(folder.id, EntityFolder.USER);
|
||||
else if (EntityFolder.USER.equals(folder.type) && EntityFolder.SYSTEM.equals(type))
|
||||
db.folder().setFolderType(folder.id, type);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user