diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-16 13:53:16 +0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-16 13:54:03 +0200 |
commit | 0de9d8dc31298921f7272d74cdd3c5d4217b5841 (patch) | |
tree | 468ba5005379151eff72c5aaaf37db9ba29b3ef7 /web-ui/app/js/mail_list | |
parent | 761e85e523ec61f5629a9f1f6e4196e23ce96673 (diff) |
decreasing count on tag and tag shortcut when email is read. we were
decreasing only tags that were also in the read mail, but we have also
to look at the mailbox and compare that to the tags in the case of
default tags #95
Diffstat (limited to 'web-ui/app/js/mail_list')
-rw-r--r-- | web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js | 3 | ||||
-rw-r--r-- | web-ui/app/js/mail_list/ui/mail_items/mail_item.js | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js b/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js index 3d426447..d5dfbf28 100644 --- a/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js +++ b/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js @@ -51,7 +51,8 @@ define( function updateMailStatusToRead() { if (!_.contains(this.attr.mail.status, this.status.READ)) { - this.trigger(document, events.mail.read, { ident: this.attr.ident, tags: this.attr.mail.tags }); + var mail_read_data = { ident: this.attr.ident, tags: this.attr.tags, mailbox: this.attr.mailbox }; + this.trigger(document, events.mail.read, mail_read_data); this.attr.mail.status.push(this.status.READ); this.$node.addClass(viewHelpers.formatStatusClasses(this.attr.mail.status)); } diff --git a/web-ui/app/js/mail_list/ui/mail_items/mail_item.js b/web-ui/app/js/mail_list/ui/mail_items/mail_item.js index 5a4192e6..5f1f354a 100644 --- a/web-ui/app/js/mail_list/ui/mail_items/mail_item.js +++ b/web-ui/app/js/mail_list/ui/mail_items/mail_item.js @@ -1,6 +1,6 @@ /* * Copyright (c) 2014 ThoughtWorks, Inc. - * + * * Pixelated is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -64,6 +64,7 @@ define( this.attr.ident = mail.ident; this.attr.statuses = viewHelper.formatStatusClasses(mail.status); this.attr.tags = mail.tags; + this.attr.mailbox = mail.mailbox; this.attr.header.formattedDate = this.formattedDate(mail.header.date); }; |