TF-1645 Fix always show default mailbox in destination picker
(cherry picked from commit 81594b3e41019077e5c659f6754693ff6acb446c)
This commit is contained in:
@@ -118,14 +118,14 @@ class DestinationPickerController extends BaseMailboxController {
|
|||||||
if (success is GetAllMailboxSuccess) {
|
if (success is GetAllMailboxSuccess) {
|
||||||
if (mailboxAction.value == MailboxActions.move && mailboxIdSelected != null) {
|
if (mailboxAction.value == MailboxActions.move && mailboxIdSelected != null) {
|
||||||
buildTree(
|
buildTree(
|
||||||
success.mailboxList.listSubscribedMailboxes,
|
success.mailboxList.listSubscribedMailboxesAndDefaultMailboxes,
|
||||||
mailboxIdSelected: mailboxIdSelected
|
mailboxIdSelected: mailboxIdSelected
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
buildTree(success.mailboxList.listSubscribedMailboxes);
|
buildTree(success.mailboxList.listSubscribedMailboxesAndDefaultMailboxes);
|
||||||
}
|
}
|
||||||
} else if (success is RefreshChangesAllMailboxSuccess) {
|
} else if (success is RefreshChangesAllMailboxSuccess) {
|
||||||
refreshTree(success.mailboxList.listSubscribedMailboxes);
|
refreshTree(success.mailboxList.listSubscribedMailboxesAndDefaultMailboxes);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ import 'package:model/mailbox/presentation_mailbox.dart';
|
|||||||
|
|
||||||
extension ListPresentationMailboxExtension on List<PresentationMailbox> {
|
extension ListPresentationMailboxExtension on List<PresentationMailbox> {
|
||||||
|
|
||||||
List<PresentationMailbox> get listSubscribedMailboxes =>
|
|
||||||
where((mailbox) => mailbox.isSubscribedMailbox).toList();
|
|
||||||
|
|
||||||
List<PresentationMailbox> get listSubscribedMailboxesAndDefaultMailboxes =>
|
List<PresentationMailbox> get listSubscribedMailboxesAndDefaultMailboxes =>
|
||||||
where((mailbox) => mailbox.isSubscribedMailbox || mailbox.isDefault).toList();
|
where((mailbox) => mailbox.isSubscribedMailbox || mailbox.isDefault).toList();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user