diff --git a/addons/mail/static/src/models/message_seen_indicator.js b/addons/mail/static/src/models/message_seen_indicator.js index bbf582c9874..5fa99032462 100644 --- a/addons/mail/static/src/models/message_seen_indicator.js +++ b/addons/mail/static/src/models/message_seen_indicator.js @@ -7,40 +7,6 @@ import { replace, unlinkAll } from '@mail/model/model_field_command'; registerModel({ name: 'MessageSeenIndicator', identifyingFields: ['thread', 'message'], - modelMethods: { - /** - * @param {Thread} [channel] the concerned thread - */ - recomputeFetchedValues(channel = undefined) { - const indicatorFindFunction = channel ? localIndicator => localIndicator.thread === channel : undefined; - const indicators = this.messaging.models['MessageSeenIndicator'].all(indicatorFindFunction); - for (const indicator of indicators) { - indicator.update({ - hasEveryoneFetched: indicator._computeHasEveryoneFetched(), - hasSomeoneFetched: indicator._computeHasSomeoneFetched(), - partnersThatHaveFetched: indicator._computePartnersThatHaveFetched(), - }); - } - }, - /** - * @param {Thread} [channel] the concerned thread - */ - recomputeSeenValues(channel = undefined) { - const indicatorFindFunction = channel ? localIndicator => localIndicator.thread === channel : undefined; - const indicators = this.messaging.models['MessageSeenIndicator'].all(indicatorFindFunction); - for (const indicator of indicators) { - indicator.update({ - hasEveryoneSeen: indicator._computeHasEveryoneSeen(), - hasSomeoneFetched: indicator._computeHasSomeoneFetched(), - hasSomeoneSeen: indicator._computeHasSomeoneSeen(), - isMessagePreviousToLastCurrentPartnerMessageSeenByEveryone: - indicator._computeIsMessagePreviousToLastCurrentPartnerMessageSeenByEveryone(), - partnersThatHaveFetched: indicator._computePartnersThatHaveFetched(), - partnersThatHaveSeen: indicator._computePartnersThatHaveSeen(), - }); - } - }, - }, recordMethods: { /** * Manually called as not always called when necessary diff --git a/addons/mail/static/src/models/messaging_notification_handler.js b/addons/mail/static/src/models/messaging_notification_handler.js index a799d9d276b..9309ecd5fa3 100644 --- a/addons/mail/static/src/models/messaging_notification_handler.js +++ b/addons/mail/static/src/models/messaging_notification_handler.js @@ -177,8 +177,6 @@ registerModel({ message: insertAndReplace({ id: last_message_id }), thread: replace(channel), }); - // FIXME force the computing of message values (cf task-2261221) - this.messaging.models['MessageSeenIndicator'].recomputeFetchedValues(channel); }, /** * @private @@ -328,8 +326,6 @@ registerModel({ if (shouldComputeSeenIndicators) { // FIXME force the computing of thread values (cf task-2261221) this.messaging.models['Thread'].computeLastCurrentPartnerMessageSeenByEveryone(channel); - // FIXME force the computing of message values (cf task-2261221) - this.messaging.models['MessageSeenIndicator'].recomputeSeenValues(channel); } }, /**