From 50805a2e15841753f2d4302527ba00ec4c90edb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Wed, 7 Oct 2020 15:47:14 +0000 Subject: [FIX] mail: avoid useless (un)link when using replace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Side effect of this change: dependencies are not longer triggered when replace is not actually doing anything. task-2270780 closes odoo/odoo#59508 X-original-commit: 75a44675873d65fdf17f2205772b05a0f59bb42c Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/models/thread_cache/thread_cache.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addons/mail/static/src/models/thread_cache/thread_cache.js') diff --git a/addons/mail/static/src/models/thread_cache/thread_cache.js b/addons/mail/static/src/models/thread_cache/thread_cache.js index d909fb88984..080040981f2 100644 --- a/addons/mail/static/src/models/thread_cache/thread_cache.js +++ b/addons/mail/static/src/models/thread_cache/thread_cache.js @@ -262,6 +262,10 @@ function factory(dependencies) { if (!extraDomain && messages.length < limit) { this.update({ isAllHistoryLoaded: true }); } + this.env.messagingBus.trigger('o-thread-cache-loaded-messages', { + fetchedMessages: messages, + threadCache: this, + }); return messages; } -- cgit v1.2.3