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
@@ -65,14 +65,17 @@ class MailboxVisibilityController extends BaseMailboxController {
}
@override
void handleSuccessViewState(Success success) {
void handleSuccessViewState(Success success) async {
super.handleSuccessViewState(success);
if (success is GetAllMailboxSuccess) {
currentMailboxState = success.currentMailboxState;
_handleBuildTree(success.mailboxList);
} else if (success is RefreshChangesAllMailboxSuccess) {
currentMailboxState = success.currentMailboxState;
refreshTree(success.mailboxList);
await refreshTree(success.mailboxList);
if (currentContext != null) {
await syncAllMailboxWithDisplayName(currentContext!);
}
} else if (success is SubscribeMailboxSuccess) {
_subscribeMailboxSuccess(success);
} else if (success is SubscribeMultipleMailboxAllSuccess) {
@@ -96,6 +99,9 @@ class MailboxVisibilityController extends BaseMailboxController {
dispatchState(Right(LoadingBuildTreeMailboxVisibility()));
await buildTree(mailboxList);
dispatchState(Right(BuildTreeMailboxVisibilitySuccess()));
if (currentContext != null) {
await syncAllMailboxWithDisplayName(currentContext!);
}
}
void subscribeMailbox(MailboxNode mailboxNode) {