summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/thread_cache
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-10-07 15:47:14 +0000
committerSébastien Theys <seb@odoo.com>2020-10-08 12:53:17 +0000
commit50805a2e15841753f2d4302527ba00ec4c90edb1 (patch)
tree8511d0ff765766cf57b4a4b6ca622eeafd714603 /addons/mail/static/src/models/thread_cache
parent9f1280e275fd851fce17bf82c603fdc50a8ef94e (diff)
[FIX] mail: avoid useless (un)link when using replace
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) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/thread_cache')
-rw-r--r--addons/mail/static/src/models/thread_cache/thread_cache.js4
1 files changed, 4 insertions, 0 deletions
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;
}