mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
b066c06813
commit
3a8bad6208
|
@ -1891,11 +1891,8 @@ class Core {
|
||||||
if (folder == null) {
|
if (folder == null) {
|
||||||
EntityFolder parent = null;
|
EntityFolder parent = null;
|
||||||
int sep = fullName.lastIndexOf(account.separator);
|
int sep = fullName.lastIndexOf(account.separator);
|
||||||
if (sep > 0) {
|
if (sep > 0)
|
||||||
parent = db.folder().getFolderByName(account.id, fullName.substring(0, sep));
|
parent = db.folder().getFolderByName(account.id, fullName.substring(0, sep));
|
||||||
if (parent != null && !EntityFolder.USER.equals(parent.type))
|
|
||||||
parent = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
folder = new EntityFolder();
|
folder = new EntityFolder();
|
||||||
folder.account = account.id;
|
folder.account = account.id;
|
||||||
|
@ -1907,7 +1904,7 @@ class Core {
|
||||||
folder.setProperties();
|
folder.setProperties();
|
||||||
folder.setSpecials(account);
|
folder.setSpecials(account);
|
||||||
|
|
||||||
if (parent != null) {
|
if (parent != null && EntityFolder.USER.equals(parent.type)) {
|
||||||
folder.synchronize = parent.synchronize;
|
folder.synchronize = parent.synchronize;
|
||||||
folder.poll = parent.poll;
|
folder.poll = parent.poll;
|
||||||
folder.poll_factor = parent.poll_factor;
|
folder.poll_factor = parent.poll_factor;
|
||||||
|
|
Loading…
Reference in New Issue