TF-322 Sort default mailbox in TreeBuilder

This commit is contained in:
Dat PHAM HOANG
2022-03-18 17:06:13 +07:00
committed by Dat H. Pham
parent c2dc3b43fb
commit 71fc8a595e
6 changed files with 61 additions and 10 deletions
@@ -135,4 +135,16 @@ extension MailboxNodeExtension on MailboxNode {
selectMode: selectMode,
);
}
int compareTo(MailboxNode other) {
if (item.sortOrder == null) {
return -1;
}
if (other.item.sortOrder == null) {
return 1;
}
return item.sortOrder!.value.value.compareTo(other.item.sortOrder!.value.value);
}
}