TF-1436 Only add parent node when parentId != null

This commit is contained in:
dab246
2023-02-14 11:26:43 +07:00
committed by Dat Vu
parent 7bb36e6861
commit 350b4b2432
@@ -80,7 +80,7 @@ class TreeBuilder {
(node) => node.item.name, (node) => node.item.name,
(name, other) => name?.compareAlphabetically(other) ?? -1 (name, other) => name?.compareAlphabetically(other) ?? -1
); );
} else { } else if (parentId == null) {
listAllMailboxes.add(node.item); listAllMailboxes.add(node.item);
MailboxTree tree; MailboxTree tree;
@@ -97,6 +97,8 @@ class TreeBuilder {
(node) => node.item.name, (node) => node.item.name,
(name, other) => name?.compareAlphabetically(other) ?? -1 (name, other) => name?.compareAlphabetically(other) ?? -1
); );
} else {
listAllMailboxes.add(node.item);
} }
} }
} }
@@ -142,7 +144,7 @@ class TreeBuilder {
(node) => node.item.name, (node) => node.item.name,
(name, other) => name?.compareAlphabetically(other) ?? -1 (name, other) => name?.compareAlphabetically(other) ?? -1
); );
} else { } else if (parentId == null) {
MailboxTree tree; MailboxTree tree;
if (mailbox.hasRole()) { if (mailbox.hasRole()) {