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 --- .../src/js/thread_windows/abstract_thread_window.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'addons/mail/static/src/js/thread_windows/abstract_thread_window.js') 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 @@ -138,6 +138,15 @@ var AbstractThreadWindow = Widget.extend({ getID: function () { 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 @@ -256,14 +265,6 @@ var AbstractThreadWindow = Widget.extend({ this.$header.html( 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 */ @@ -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, -- cgit v1.2.3