From c66589a9ac53c16074cf9e4265f0e077dff99fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Mon, 28 Mar 2022 12:16:20 +0000 Subject: [PATCH] [IMP] mail: remove Thread/compute static method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-2806655 closes odoo/odoo#87354 Signed-off-by: Alexandre Kühn (aku) --- .../src/models/messaging_notification_handler.js | 4 ---- addons/mail/static/src/models/thread.js | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/addons/mail/static/src/models/messaging_notification_handler.js b/addons/mail/static/src/models/messaging_notification_handler.js index 9309ecd5fa3..16d210c2d5d 100644 --- a/addons/mail/static/src/models/messaging_notification_handler.js +++ b/addons/mail/static/src/models/messaging_notification_handler.js @@ -323,10 +323,6 @@ registerModel({ pendingSeenMessageId: undefined, }); } - if (shouldComputeSeenIndicators) { - // FIXME force the computing of thread values (cf task-2261221) - this.messaging.models['Thread'].computeLastCurrentPartnerMessageSeenByEveryone(channel); - } }, /** * @private diff --git a/addons/mail/static/src/models/thread.js b/addons/mail/static/src/models/thread.js index ba1b4d8da8d..e487afa96df 100644 --- a/addons/mail/static/src/models/thread.js +++ b/addons/mail/static/src/models/thread.js @@ -122,17 +122,6 @@ registerModel({ }, }, modelMethods: { - /** - * @param {Thread} [thread] the concerned thread - */ - computeLastCurrentPartnerMessageSeenByEveryone(thread = undefined) { - const threads = thread ? [thread] : this.messaging.models['Thread'].all(); - threads.map(localThread => { - localThread.update({ - lastCurrentPartnerMessageSeenByEveryone: localThread._computeLastCurrentPartnerMessageSeenByEveryone(), - }); - }); - }, /** * @param {Object} data * @return {Object}