summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/thread_preview
diff options
context:
space:
mode:
authorXavier Dubuc <xdu@odoo.com>2020-11-02 11:31:13 +0000
committerSébastien Theys <seb@odoo.com>2020-11-02 11:31:13 +0000
commit03481fd3df9bc53a17ba884ad4029ae46d7e54bf (patch)
tree4e374aad0a7a6c845ee605b77cbe4e282efb7391 /addons/mail/static/src/components/thread_preview
parentb3e31f2680534382b048324cfcb8a6f6c457553f (diff)
[FIX] mail: handle transient messages with (un)seen notions
task-2343887 closes odoo/odoo#60906 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/thread_preview')
-rw-r--r--addons/mail/static/src/components/thread_preview/thread_preview.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/static/src/components/thread_preview/thread_preview.js b/addons/mail/static/src/components/thread_preview/thread_preview.js
index b10e8ee2586..92fcb6101d1 100644
--- a/addons/mail/static/src/components/thread_preview/thread_preview.js
+++ b/addons/mail/static/src/components/thread_preview/thread_preview.js
@@ -108,8 +108,8 @@ class ThreadPreview extends Component {
* @param {MouseEvent} ev
*/
_onClickMarkAsRead(ev) {
- if (this.thread.lastMessage) {
- this.thread.markAsSeen(this.thread.lastMessage.id);
+ if (this.thread.lastNonTransientMessage) {
+ this.thread.markAsSeen(this.thread.lastNonTransientMessage);
}
}