mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Auto map new folders
This commit is contained in:
parent
a20d855354
commit
ca401f27ea
1 changed files with 7 additions and 1 deletions
|
@ -2529,12 +2529,18 @@ class Core {
|
|||
if (sep > 0)
|
||||
parent = db.folder().getFolderByName(account.id, fullName.substring(0, sep));
|
||||
|
||||
if (!EntityFolder.USER.equals(type) && !EntityFolder.SYSTEM.equals(type)) {
|
||||
EntityFolder has = db.folder().getFolderByType(account.id, type);
|
||||
if (has != null)
|
||||
type = EntityFolder.USER;
|
||||
}
|
||||
|
||||
folder = new EntityFolder();
|
||||
folder.account = account.id;
|
||||
folder.namespace = ifolder.first.getFullName();
|
||||
folder.separator = separator;
|
||||
folder.name = fullName;
|
||||
folder.type = (EntityFolder.SYSTEM.equals(type) ? type : EntityFolder.USER);
|
||||
folder.type = type;
|
||||
folder.subscribed = subscribed;
|
||||
folder.selectable = selectable;
|
||||
folder.inferiors = inferiors;
|
||||
|
|
Loading…
Reference in a new issue