Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #8078 from asutherland/email-pending-toaster-fix-v1

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...
commit 143fda9f0cfcbc7d03bf828cba090e05041f05df 2 parents 2981c3b + 77225ab
@asutherland asutherland authored
Showing with 9 additions and 8 deletions.
  1. +7 −6 apps/email/js/mail-common.js
  2. +2 −2 apps/email/js/message-cards.js
View
13 apps/email/js/mail-common.js
@@ -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)
@@ -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();
+ }
}
},
View
4 apps/email/js/message-cards.js
@@ -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
@@ -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));
},
Please sign in to comment.
Something went wrong with that request. Please try again.