diff options
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.js | 13 |
1 files changed, 5 insertions, 8 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 ceff30d1077..132425184b3 100644 --- a/addons/mail/static/src/components/thread_view/thread_view.js +++ b/addons/mail/static/src/components/thread_view/thread_view.js @@ -6,6 +6,7 @@ const components = { MessageList: require('mail/static/src/components/message_list/message_list.js'), }; const useStore = require('mail/static/src/component_hooks/use_store/use_store.js'); +const useUpdate = require('mail/static/src/component_hooks/use_update/use_update.js'); const { Component } = owl; const { useRef } = owl.hooks; @@ -18,6 +19,10 @@ 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 + }); /** * Reference of the composer. Useful to set focus on composer when * thread has the focus. @@ -29,14 +34,6 @@ class ThreadView extends Component { this._messageListRef = useRef('messageList'); } - mounted() { - this._update(); - } - - patched() { - this._update(); - } - //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- |
