summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/models/threads
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/models/threads
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/models/threads')
-rw-r--r--addons/mail/static/src/js/models/threads/thread_typing_mixin/thread_typing_mixin.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/models/threads/thread_typing_mixin/thread_typing_mixin.js b/addons/mail/static/src/js/models/threads/thread_typing_mixin/thread_typing_mixin.js
index fb1a3a91cd1..9a5b5abb4cc 100644
--- a/addons/mail/static/src/js/models/threads/thread_typing_mixin/thread_typing_mixin.js
+++ b/addons/mail/static/src/js/models/threads/thread_typing_mixin/thread_typing_mixin.js
@@ -148,6 +148,15 @@ var ThreadTypingMixin = {
return true;
},
/**
+ * Tells if someone other than current user is typing something on this
+ * thread.
+ *
+ * @returns {boolean}
+ */
+ isSomeoneTyping: function () {
+ return !(_.isEmpty(this._typingPartnerIDs));
+ },
+ /**
* Register someone that is currently typing something in this thread.
* If this is the current user that is typing something, don't do anything
* (we do not have to display anything)