(js) Show all mailboxes when copying messages

This commit is contained in:
Francis Lachapelle
2015-12-10 12:07:01 -05:00
parent b74b73bca4
commit cfe6a30d64
2 changed files with 12 additions and 10 deletions

View File

@@ -166,7 +166,7 @@
</md-menu-item>
<md-menu-divider><!-- divider --></md-menu-divider>
<md-menu-item ng-repeat="folder in
account.$flattenMailboxes()
account.$flattenMailboxes({ all: true })
track by folder.path"
ng-hide="mailbox.id == folder.id">
<md-button ng-click="mailbox.copySelectedMessages(folder.id)">

View File

@@ -160,15 +160,17 @@
}
else {
_visit(this.$mailboxes);
_this.$$flattenMailboxes = allMailboxes;
if (options && options.saveState) {
_.reduce(allMailboxes, function(expandedFolders, mailbox) {
if (mailbox.$expanded) {
expandedFolders.push('/' + mailbox.id);
}
return expandedFolders;
}, expandedMailboxes);
Account.$$resource.post(null, 'saveFoldersState', expandedMailboxes);
if (!options || !options.all) {
_this.$$flattenMailboxes = allMailboxes;
if (options && options.saveState) {
_.reduce(allMailboxes, function(expandedFolders, mailbox) {
if (mailbox.$expanded) {
expandedFolders.push('/' + mailbox.id);
}
return expandedFolders;
}, expandedMailboxes);
Account.$$resource.post(null, 'saveFoldersState', expandedMailboxes);
}
}
}