diff options
Diffstat (limited to 'addons/mail/static/src/models/thread')
| -rw-r--r-- | addons/mail/static/src/models/thread/thread.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/addons/mail/static/src/models/thread/thread.js b/addons/mail/static/src/models/thread/thread.js index c5d1371187b..389b5aa3580 100644 --- a/addons/mail/static/src/models/thread/thread.js +++ b/addons/mail/static/src/models/thread/thread.js @@ -1427,6 +1427,15 @@ function factory(dependencies) { } /** + * @private + */ + _onChangeLastSeenByCurrentPartnerMessageId() { + this.env.messagingBus.trigger('o-thread-last-seen-by-current-partner-message-id-changed', { + thread: this, + }); + } + + /** * Handles change of pinned state coming from the server. Useful to * clear pending state once server acknowledged the change. * @@ -1845,6 +1854,16 @@ function factory(dependencies) { dependencies: ['messages'], }), /** + * Not a real field, used to trigger `_onChangeLastSeenByCurrentPartnerMessageId` when one of + * the dependencies changes. + */ + onChangeLastSeenByCurrentPartnerMessageId: attr({ + compute: '_onChangeLastSeenByCurrentPartnerMessageId', + dependencies: [ + 'lastSeenByCurrentPartnerMessageId', + ], + }), + /** * Not a real field, used to trigger `_onIsServerPinnedChanged` when one of * the dependencies changes. */ |
