From 7ad45a04e1a368f132fcc83bbe992ce0e98ed3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Wed, 5 Dec 2018 14:35:02 +0000 Subject: [IMP] im_livechat, mail: improved "is typing" notification With this commit, the UI for "is typing..." notifications has changed. ** before **: In Discuss & chat windows, "is typing..." notification bar at the bottom of the thread, inside the conversation. ** after ** In chat windows, animated '...' next to conversation name. In Discuss, animated '...' next to conversation name in sidebar, and text below the composer. Task-ID 1881001 --- .../mail/static/src/js/thread_windows/thread_window.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'addons/mail/static/src/js/thread_windows/thread_window.js') 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 62468e9ea16..f4b0137c476 100644 --- a/addons/mail/static/src/js/thread_windows/thread_window.js +++ b/addons/mail/static/src/js/thread_windows/thread_window.js @@ -55,6 +55,9 @@ 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); + var composerDef; if (!this.hasThread()) { this._startWithoutThread(); @@ -353,7 +356,19 @@ var ThreadWindow = AbstractThreadWindow.extend({ var message = this.call('mail_service', 'getMessage', messageID); message.toggleStarStatus(); }, - + /** + * @private + * @param {integer|string} threadID + */ + _onUpdateTypingPartners: function (threadID) { + if (!this.hasThread()) { + return; + } + if (this._thread.getID() !== threadID) { + return; + } + this.renderHeader(); + }, }); return ThreadWindow; -- cgit v1.2.3