TF-1708 Improvement search mailbox by display name at locale

(cherry picked from commit f3efbe715c06b87ce3006dc936be26dd272a643c)
This commit is contained in:
dab246
2023-07-06 19:35:11 +07:00
committed by Dat Vu
parent e94f1959f1
commit 36f13051bd
11 changed files with 122 additions and 47 deletions
@@ -20,26 +20,49 @@ extension PresentationMailboxExtension on PresentationMailbox {
mailboxPath: mailboxPath,
state: state,
namespace: namespace,
displayName: displayName,
);
}
PresentationMailbox withDisplayName(String? displayName) {
return PresentationMailbox(
id,
name: name,
parentId: parentId,
role: role,
sortOrder: sortOrder,
totalEmails: totalEmails,
unreadEmails: unreadEmails,
totalThreads: totalThreads,
unreadThreads: unreadThreads,
myRights: myRights,
isSubscribed: isSubscribed,
selectMode: selectMode,
mailboxPath: mailboxPath,
state: state,
namespace: namespace,
displayName: displayName,
);
}
PresentationMailbox withMailboxSate(MailboxState newMailboxState) {
return PresentationMailbox(
id,
name: name,
parentId: parentId,
role: role,
sortOrder: sortOrder,
totalEmails: totalEmails,
unreadEmails: unreadEmails,
totalThreads: totalThreads,
unreadThreads: unreadThreads,
myRights: myRights,
isSubscribed: isSubscribed,
selectMode: selectMode,
mailboxPath: mailboxPath,
state: newMailboxState,
namespace: namespace,
id,
name: name,
parentId: parentId,
role: role,
sortOrder: sortOrder,
totalEmails: totalEmails,
unreadEmails: unreadEmails,
totalThreads: totalThreads,
unreadThreads: unreadThreads,
myRights: myRights,
isSubscribed: isSubscribed,
selectMode: selectMode,
mailboxPath: mailboxPath,
state: newMailboxState,
namespace: namespace,
displayName: displayName,
);
}
@@ -62,21 +85,22 @@ extension PresentationMailboxExtension on PresentationMailbox {
PresentationMailbox toggleSelectPresentationMailbox() {
return PresentationMailbox(
id,
name: name,
parentId: parentId,
role: role,
sortOrder: sortOrder,
totalEmails: totalEmails,
unreadEmails: unreadEmails,
totalThreads: totalThreads,
unreadThreads: unreadThreads,
myRights: myRights,
isSubscribed: isSubscribed,
mailboxPath: mailboxPath,
selectMode: selectMode == SelectMode.INACTIVE ? SelectMode.ACTIVE : SelectMode.INACTIVE,
state: state,
namespace: namespace,
id,
name: name,
parentId: parentId,
role: role,
sortOrder: sortOrder,
totalEmails: totalEmails,
unreadEmails: unreadEmails,
totalThreads: totalThreads,
unreadThreads: unreadThreads,
myRights: myRights,
isSubscribed: isSubscribed,
mailboxPath: mailboxPath,
selectMode: selectMode == SelectMode.INACTIVE ? SelectMode.ACTIVE : SelectMode.INACTIVE,
state: state,
namespace: namespace,
displayName: displayName,
);
}
@@ -97,6 +121,7 @@ extension PresentationMailboxExtension on PresentationMailbox {
selectMode: selectMode,
state: state,
namespace: namespace,
displayName: displayName,
);
}
}
@@ -45,6 +45,7 @@ class PresentationMailbox with EquatableMixin {
final String? mailboxPath;
final MailboxState? state;
final Namespace? namespace;
final String? displayName;
PresentationMailbox(
this.id,
@@ -63,6 +64,7 @@ class PresentationMailbox with EquatableMixin {
this.mailboxPath,
this.state = MailboxState.activated,
this.namespace,
this.displayName,
}
);