summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/thread_view
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-11-18 13:38:08 +0000
committerSébastien Theys <seb@odoo.com>2020-11-18 13:52:26 +0000
commitf22c34e7f61f7f8ac5b9ab7f9579cc4e6dd0e334 (patch)
tree44167a940f2a50e1f50b333c604ad05664395bd9 /addons/mail/static/src/components/thread_view
parent7a2902733c0538a410dd5b8df0de08e225b23426 (diff)
[FIX] mail: avoid marking hint as resolved before message list render
This change highlighted issues with the async behavior of `useUpdate`, which was no longer necessary and therefore reverted. This in turn highlighted issue with animation of chat window unfolding, making restoring of scroll position not work as intended due to the message list not having its whole height available during some time after render. This animation being minor (and even annoying in some cases) it was decided to remove it. task-2387729 closes odoo/odoo#61881 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/thread_view')
-rw-r--r--addons/mail/static/src/components/thread_view/thread_view.js16
1 files changed, 1 insertions, 15 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 132425184b3..a6109aa4e1c 100644
--- a/addons/mail/static/src/components/thread_view/thread_view.js
+++ b/addons/mail/static/src/components/thread_view/thread_view.js
@@ -19,10 +19,7 @@ class ThreadView extends Component {
constructor(...args) {
super(...args);
useStore((...args) => this._useStoreSelector(...args));
- useUpdate({
- func: () => this._update(),
- priority: 100, // must be executed after composer height adjust
- });
+ useUpdate({ func: () => this._update() });
/**
* Reference of the composer. Useful to set focus on composer when
* thread has the focus.
@@ -110,18 +107,7 @@ class ThreadView extends Component {
* @private
*/
_update() {
- const messageList = this._messageListRef.comp;
this.trigger('o-rendered');
- /**
- * Control panel may offset scrolling position of message list due to
- * height of buttons. To prevent this, control panel re-render is
- * triggered before message list. Correct way should be to adjust
- * scroll positions after everything has been rendered, but OWL doesn't
- * have such an API for the moment.
- */
- if (messageList) {
- messageList.adjustFromComponentHints();
- }
}
/**