Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #8078 from asutherland/email-pending-toaster-fix-v1
Browse files Browse the repository at this point in the history
Bug 837357 - [email/UI] Pending/deferred banner/toaster notifications for message deletion and moves are not displayed on transition back to message list from message reader. r=steveck-chung (cherry picked from commit d50061a
  • Loading branch information
asutherland committed Feb 13, 2013
2 parents 2981c3b + 77225ab commit 143fda9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions apps/email/js/mail-common.js
Expand Up @@ -751,12 +751,6 @@ var Cards = {

// Hide toaster while active card index changed:
Toaster.hide();
// Popup toaster that pended for previous card view.
var pendingToaster = Toaster.pendingStack.slice(-1)[0];
if (pendingToaster && showMethod == 'immediate') {
pendingToaster();
Toaster.pendingStack.pop();
}

this.activeCardIndex = cardIndex;
if (cardInst)
Expand Down Expand Up @@ -790,6 +784,13 @@ var Cards = {
removeClass(endNode, 'disabled-anim-vertical');
addClass(endNode, 'anim-vertical');
}

// Popup toaster that pended for previous card view.
var pendingToaster = Toaster.pendingStack.slice(-1)[0];
if (pendingToaster) {
pendingToaster();
Toaster.pendingStack.pop();
}
}
},

Expand Down
4 changes: 2 additions & 2 deletions apps/email/js/message-cards.js
Expand Up @@ -939,9 +939,9 @@ MessageReaderCard.prototype = {
{ // Confirm
id: 'msg-delete-ok',
handler: function() {
Cards.removeCardAndSuccessors(this.domNode, 'animate');
var op = this.header.deleteMessage();
Toaster.logMutation(op, true);
Cards.removeCardAndSuccessors(this.domNode, 'animate');
}.bind(this)
},
{ // Cancel
Expand All @@ -964,9 +964,9 @@ MessageReaderCard.prototype = {
onMove: function() {
//TODO: Please verify move functionality after api landed.
Cards.folderSelector(function(folder) {
Cards.removeCardAndSuccessors(this.domNode, 'animate');
var op = this.header.moveMessage(folder);
Toaster.logMutation(op, true);
Cards.removeCardAndSuccessors(this.domNode, 'animate');
}.bind(this));
},

Expand Down

0 comments on commit 143fda9

Please sign in to comment.