From f10c9114e64df34b07495acd8fdaeae8cdc0a3d9 Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Mon, 6 Nov 2023 10:44:28 +0100 Subject: [PATCH] [FIX] mail: fix scroll flicker on thread start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `onWillStart` hook that was used in the thread component but was replaced by the `onMounted` hook. Indeed, fetching the messages in the `onWillStart` hook was leading to an infinite loop (props updated as a side-effect of the `onWillStart` hook). After messages are loaded, the scroll position of the thread is restored. Since this is done after the component is mounted, another render is triggered and results in a flicker when opening the thread. This commit fixes this issue by waiting for the thread to be mounted and for the scroll position to be restored before showing the message list. closes odoo/odoo#141145 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/core/common/thread.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/core/common/thread.xml b/addons/mail/static/src/core/common/thread.xml index 7e6e4ab9b90..5fb6294938c 100644 --- a/addons/mail/static/src/core/common/thread.xml +++ b/addons/mail/static/src/core/common/thread.xml @@ -17,7 +17,7 @@ - +