summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-12-05 14:35:02 +0000
committerAlexandre Kühn <aku@odoo.com>2018-12-06 14:51:28 +0000
commit7ad45a04e1a368f132fcc83bbe992ce0e98ed3d2 (patch)
tree5b106206817e1f73251374879f6d18d174704559 /addons/mail/static/src/js/thread_windows/abstract_thread_window.js
parent9117d968e056d7c4e1112079e7e0ea0dd63cf9a5 (diff)
[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
Diffstat (limited to 'addons/mail/static/src/js/thread_windows/abstract_thread_window.js')
-rw-r--r--addons/mail/static/src/js/thread_windows/abstract_thread_window.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/addons/mail/static/src/js/thread_windows/abstract_thread_window.js b/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
index f4bf9533ff9..3e4e2e16325 100644
--- a/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
+++ b/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
@@ -139,6 +139,15 @@ var AbstractThreadWindow = Widget.extend({
return this._getThreadID();
},
/**
+ * @returns {mail.model.Thread|undefined}
+ */
+ getThread: function () {
+ if (!this.hasThread) {
+ return undefined;
+ }
+ return this._thread;
+ },
+ /**
* Get the status of the thread, such as the im status of a DM chat
* ('online', 'offline', etc.). If this window has no thread, returns
* `undefined`.
@@ -257,14 +266,6 @@ var AbstractThreadWindow = Widget.extend({
QWeb.render('mail.AbstractThreadWindow.HeaderContent', options));
},
/**
- * Render the 'is typing...' notification bar text on the thread in this
- * thread window. This is called when there is a change in the list of users
- * currently typing something on this thread.
- */
- renderTypingNotificationBar: function () {
- this._threadWidget.renderTypingNotificationBar(this._thread);
- },
- /**
* Scroll to the bottom of the thread in the thread window
*/
scrollToBottom: function () {
@@ -339,6 +340,7 @@ var AbstractThreadWindow = Widget.extend({
_getHeaderRenderingOptions: function () {
return {
status: this.getThreadStatus(),
+ thread: this.getThread(),
title: this.getTitle(),
unreadCounter: this.getUnreadCounter(),
widget: this,