fix(mail(js)): unselect all messages when changing mailbox

Fixes #4970
Fixes #5148
This commit is contained in:
Francis Lachapelle committed 2021-04-14 14:28:22 -04:00
1 parent bed91ce95a
commit bfbf43b1c8
2 files changed
+14 -1

No files matched your search

@@ -255,11 +255,13 @@
if (Mailbox.$virtualMode)
return [];
if (stateMailbox)
if (stateMailbox) {
stateMailbox.$unselectMessages();
promise = stateMailbox.$filter().catch(function() {
// Mailbox not found
return $q.reject('Mailbox not found');
});
}
else
promise = $q.reject("Mailbox doesn't exist");