summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_windows/thread_window.js
diff options
context:
space:
mode:
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.js17
1 files changed, 16 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 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;