diff options
| author | Aaron Bohy <aab@odoo.com> | 2015-11-18 11:16:18 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2015-11-23 16:29:08 +0100 |
| commit | faf5cea9480bfdd0635bccbc3a9ea88c19ceeb64 (patch) | |
| tree | 58fdebc6cc9b1b2a1148ad6fbcf80b3c35fd113e /addons/mail/static/src/js/chat_manager.js | |
| parent | 00630c5fd7844304122f7cbae59c5f329515fea5 (diff) | |
[FIX] mail: various UI improvements
- emoji are no more clickable in threads (they are only in the popover)
- correctly update channel needaction counter
- don't display 'New message' notification when the channel in detached
- display in the ui channels that send emails and other channels
- prevent notifications in mass mailing channels
- increase bottom padding in client action thread
Diffstat (limited to 'addons/mail/static/src/js/chat_manager.js')
| -rw-r--r-- | addons/mail/static/src/js/chat_manager.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js index d16683d3647..239291628f0 100644 --- a/addons/mail/static/src/js/chat_manager.js +++ b/addons/mail/static/src/js/chat_manager.js @@ -200,6 +200,7 @@ function make_channel (data, options) { autoswitch: 'autoswitch' in options ? options.autoswitch : true, hidden: options.hidden, display_needactions: options.display_needactions, + mass_mailing: data.mass_mailing, needaction_counter: data.message_needaction_counter || 0, unread_counter: data.message_unread_counter || 0, last_seen_message_id: data.seen_message_id, @@ -330,10 +331,12 @@ function on_notification (notification) { function on_needaction_notification (message) { message = add_message(message, { channel_id: 'channel_inbox', show_notification: true} ); needaction_counter++; - var channel = chat_manager.get_channel(message.channel_ids[0]); - if (channel) { - channel.needaction_counter++; - } + _.each(message.channel_ids, function (channel_id) { + var channel = chat_manager.get_channel(channel_id); + if (channel) { + channel.needaction_counter++; + } + }); chat_manager.bus.trigger('update_needaction', needaction_counter); } |
