diff options
| author | Didier (did) <did@odoo.com> | 2020-12-07 09:13:24 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-12-10 12:33:14 +0000 |
| commit | bcb32beb49e5d86ea0d6307cbeeb7e85a22d18b0 (patch) | |
| tree | 49ac1f6506eeb79c4e5696a128372696195757a9 /addons/mail | |
| parent | 6d75304604687d873b296c630b87bc184e221018 (diff) | |
[FIX] mail: mark all needaction as read when opening the thread
This was the case before the refactoring.
task-2411114
closes odoo/odoo#62942
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/static/src/components/message/message.js | 1 | ||||
| -rw-r--r-- | addons/mail/static/src/models/thread/thread.js | 21 |
2 files changed, 11 insertions, 11 deletions
diff --git a/addons/mail/static/src/components/message/message.js b/addons/mail/static/src/components/message/message.js index d4cee21e074..7423b1443fb 100644 --- a/addons/mail/static/src/components/message/message.js +++ b/addons/mail/static/src/components/message/message.js @@ -521,7 +521,6 @@ class Message extends Component { _onClickOriginThread(ev) { // avoid following dummy href ev.preventDefault(); - this.message.markAsRead(); this.message.originThread.open(); } diff --git a/addons/mail/static/src/models/thread/thread.js b/addons/mail/static/src/models/thread/thread.js index 4e1f1119351..6135a8802c3 100644 --- a/addons/mail/static/src/models/thread/thread.js +++ b/addons/mail/static/src/models/thread/thread.js @@ -1077,6 +1077,7 @@ function factory(dependencies) { /** * @private + * @returns {boolean} */ _computeHasSeenIndicators() { if (this.model !== 'mail.channel') { @@ -1509,23 +1510,23 @@ function factory(dependencies) { } /** - * Fetches followers of chats when they are displayed for the first - * time. This is necessary to clean the followers. - * @see `_onChangeFollowersPartner` for more information. - * * @private */ _onChangeThreadViews() { - if (this.channel_type !== 'chat') { - return; - } if (this.threadViews.length === 0) { return; } - if (this.areFollowersLoaded) { - return; + /** + * Fetches followers of chats when they are displayed for the first + * time. This is necessary to clean the followers. + * @see `_onChangeFollowersPartner` for more information. + */ + if (this.channel_type === 'chat' && !this.areFollowersLoaded) { + this.refreshFollowers(); + } + if (this.needactionMessagesAsOriginThread.length > 0) { + this.markNeedactionMessagesAsOriginThreadAsRead(); } - this.refreshFollowers(); } /** |
