From 91ce61ba568d83190e7ed2c168fd56101474683b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Fri, 23 Oct 2020 11:03:09 +0000 Subject: [FIX] mail: do not return members of channels in channel_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR has 3 parts: The members fix itself, which is necessary for performance reasons especially at init messaging, as per described in the task. Adding the partner name in the typing payload, because due to not knowing all members anymore, it is necessary to properly display who is typing. Restrict restoring scroll position only if the corresponding scroll height is available, to make the scroll feature and particularly the corresponding tests more robust. task-2360020 closes odoo/odoo#60091 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/components/thread_view/thread_view.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'addons/mail/static/src/components/thread_view') 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 395fac68474..42e513be888 100644 --- a/addons/mail/static/src/components/thread_view/thread_view.js +++ b/addons/mail/static/src/components/thread_view/thread_view.js @@ -61,6 +61,18 @@ class ThreadView extends Component { this._composerRef.comp.focusout(); } + /** + * Get the scroll height in the message list. + * + * @returns {integer|undefined} + */ + getScrollHeight() { + if (!this._messageListRef.comp) { + return undefined; + } + return this._messageListRef.comp.getScrollHeight(); + } + /** * Get the scroll position in the message list. * -- cgit v1.2.3