summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/thread_view/thread_view.js
diff options
context:
space:
mode:
authorDhruv Patel <dhp@odoo.com>2021-02-22 08:59:31 +0000
committerDhruv Patel <dhp@odoo.com>2021-03-26 04:34:04 +0000
commit069449b0e9bb950bba118fa274ab21350cfb7647 (patch)
treea0e5c558189e352186f8058be594a53eb90f86f6 /addons/mail/static/src/components/thread_view/thread_view.js
parentca0d8978b6585fe4f96100df56b8a7346468dc6c (diff)
[FIX] mail: chatter autoloading loads more messages too quickly
if you check on any chatter with a lot of messages, you will see that it starts loading all the messages as soon as you scroll down even just 1 pixel. This makes a lot of loading of the messages for no reason unnecessarily. What should happen instead is that it should load more message only when scrolling all the way down to the bottom.This works fine in chatwindow & discuss. With this commit, resolved this issue by providing the exact scrollable element to the message list from parent component to the child. so with proper element we can have proper scrollable heights and other dimensions as well to handle load more messages properly. Task : 2382735 closes odoo/odoo#66584 Related: odoo/enterprise#16767 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/thread_view/thread_view.js')
-rw-r--r--addons/mail/static/src/components/thread_view/thread_view.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/mail/static/src/components/thread_view/thread_view.js b/addons/mail/static/src/components/thread_view/thread_view.js
index 5b0f5f4a57a..2399fd165c5 100644
--- a/addons/mail/static/src/components/thread_view/thread_view.js
+++ b/addons/mail/static/src/components/thread_view/thread_view.js
@@ -202,6 +202,14 @@ Object.assign(ThreadView, {
type: String,
optional: true,
},
+ /**
+ * Function returns the exact scrollable element from the parent
+ * to manage proper scroll heights which affects the load more messages.
+ */
+ getScrollableElement: {
+ type: Function,
+ optional: true,
+ },
showComposerAttachmentsExtensions: Boolean,
showComposerAttachmentsFilenames: Boolean,
threadViewLocalId: String,