diff options
| author | Alexandre Kühn <aku@odoo.com> | 2018-12-05 14:35:29 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2018-12-06 16:18:10 +0000 |
| commit | 844fb2b51ea7cfa557b19466c0a53dde19433e7a (patch) | |
| tree | 8b092fb030790b77ebc1c4061bac08c8edc3befa /addons/mail/static/src/js/thread_windows/thread_window.js | |
| parent | 15bbadb69b1b26404a614736c3cde7980d3c1dfd (diff) | |
[IMP] mail: channel seen icon indication ('v' and 'vv')
This commit adds the seen icon next to a message for all channels
except livechat.
It tracks received and seen messages for all members of the channel.
Icon is either 1 or 2 check(s) ('v' or 'vv').
Those are the different states of this 'seen' icon:
ICON: DESCRIPTION:
no check .................. no one has received the message.
1 check ................... some members have received the
message, no one has seen it.
2 checks (greyed-out) ..... some members have seen the message,
some or everyone has received it
2 checks (green) .......... all members have seen the message
This icon is not shown for messages preceding the last message seen
by everyone, in order to reduce visual noise.
Task-ID 1881001
Diffstat (limited to 'addons/mail/static/src/js/thread_windows/thread_window.js')
| -rw-r--r-- | addons/mail/static/src/js/thread_windows/thread_window.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/thread_windows/thread_window.js b/addons/mail/static/src/js/thread_windows/thread_window.js index f4b0137c476..cd5ffa7db94 100644 --- a/addons/mail/static/src/js/thread_windows/thread_window.js +++ b/addons/mail/static/src/js/thread_windows/thread_window.js @@ -56,7 +56,8 @@ var ThreadWindow = AbstractThreadWindow.extend({ var superDef = this._super().then(this._listenThreadWidget.bind(this)); this.call('mail_service', 'getMailBus') - .on('update_typing_partners', this, this._onUpdateTypingPartners); + .on('update_typing_partners', this, this._onUpdateTypingPartners) + .on('update_channel', this, this._onUpdateChannel); var composerDef; if (!this.hasThread()) { @@ -369,6 +370,16 @@ var ThreadWindow = AbstractThreadWindow.extend({ } this.renderHeader(); }, + /** + * @private + * @param {integer} channelID + */ + _onUpdateChannel: function (channelID) { + if (this._thread.getID() !== channelID) { + return; + } + this.render(); + }, }); return ThreadWindow; |
