TF-3189 new option to copy a folder's subaddress

This commit is contained in:
Florent Azavant
2024-11-29 14:29:59 +01:00
committed by Dat H. Pham
parent 89d80fe142
commit f1ec1d7324
12 changed files with 181 additions and 7 deletions
@@ -216,14 +216,18 @@ abstract class BaseMailboxController extends BaseController {
return teamMailboxesTree.value.findNode((node) => node.item.id == mailboxId);
}
String? findNodePath(MailboxId mailboxId) {
var mailboxNodePath = defaultMailboxTree.value.getNodePath(mailboxId)
?? personalMailboxTree.value.getNodePath(mailboxId)
?? teamMailboxesTree.value.getNodePath(mailboxId);
String? findNodePathWithSeparator(MailboxId mailboxId, String pathSeparator) {
var mailboxNodePath = defaultMailboxTree.value.getNodePath(mailboxId, pathSeparator)
?? personalMailboxTree.value.getNodePath(mailboxId, pathSeparator)
?? teamMailboxesTree.value.getNodePath(mailboxId, pathSeparator);
log('BaseMailboxController::findNodePath():mailboxNodePath: $mailboxNodePath');
return mailboxNodePath;
}
String? findNodePath(MailboxId mailboxId) {
return findNodePathWithSeparator(mailboxId, '/');
}
MailboxNode? findMailboxNodeByRole(Role role) {
final mailboxNode = defaultMailboxTree.value.findNode((node) => node.item.role == role);
return mailboxNode;