From 9a66619db33fca5f0cb81d9f6bfeb0fb0290cf68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Tue, 17 Sep 2019 15:10:01 +0000 Subject: [FIX] mail: no wait init_messaging before loading webclient MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, discuss widgets had to wait for the route `mail/init_messaging`. This behaviour slowed down the loading of the web client. This commit solves the issue by rendering discuss widgets even when `mail/init_messaging` hasn't been resolved. For instance, the messaging menu displays a spinner until messaging becomes ready. Task-Id 2072835 closes odoo/odoo#37031 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/js/services/mail_document_thread_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/mail/static/src/js/services/mail_document_thread_manager.js') diff --git a/addons/mail/static/src/js/services/mail_document_thread_manager.js b/addons/mail/static/src/js/services/mail_document_thread_manager.js index 6bb66b1b439..652567baf14 100644 --- a/addons/mail/static/src/js/services/mail_document_thread_manager.js +++ b/addons/mail/static/src/js/services/mail_document_thread_manager.js @@ -34,7 +34,7 @@ MailManager.include({ this.call('local_storage', 'getItem', key); } } - this.isReady().then(this._updateDocumentThreadWindows.bind(this, this._documentThreadWindowStates)); + this._mailBus.on('messaging_ready', this, this._updateDocumentThreadWindows.bind(this, this._documentThreadWindowStates)); // listen to localStorage changes to synchronize DocumentThread's // windows between tabs this.call('local_storage', 'onStorage', this, this._onStorage); -- cgit v1.2.3