diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-08-28 10:16:37 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-08-28 13:43:54 +0000 |
| commit | f9ee1cf5f904116e4d1d70a8eaf4ee1d58b18a3a (patch) | |
| tree | 89425d0677083bb9489e42d47521c4bcf1e4ff44 /addons/mail/static/src/components/message/message.js | |
| parent | 98e12901c97a67dc87f21647473754cd6f384d4a (diff) | |
[FIX] mail, *: rename thread viewer to thread view
The "viewer" should be the "parent" not the view itself. This distinction will
become important in a future commit to allow viewers to not display the view in
some situations.
Rename done as a standalone commit to ease diff readability.
Part of task-2310623
closes odoo/odoo#56737
X-original-commit: 1b811e6a972d72de02965adda67c5b039bee023f
Related: odoo/enterprise#12756
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/message/message.js')
| -rw-r--r-- | addons/mail/static/src/components/message/message.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/addons/mail/static/src/components/message/message.js b/addons/mail/static/src/components/message/message.js index 3d7c5a5bcfa..157f3dc2acd 100644 --- a/addons/mail/static/src/components/message/message.js +++ b/addons/mail/static/src/components/message/message.js @@ -51,10 +51,10 @@ class Message extends Component { const author = message ? message.author : undefined; const partnerRoot = this.env.messaging.partnerRoot; const originThread = message ? message.originThread : undefined; - const threadViewer = this.env.models['mail.thread_viewer'].get(props.threadViewerLocalId); - const thread = threadViewer ? threadViewer.thread : undefined; - const threadStringifiedDomain = threadViewer - ? threadViewer.stringifiedDomain + const threadView = this.env.models['mail.thread_view'].get(props.threadViewLocalId); + const thread = threadView ? threadView.thread : undefined; + const threadStringifiedDomain = threadView + ? threadView.stringifiedDomain : undefined; return { attachments: message @@ -63,7 +63,7 @@ class Message extends Component { author: author ? author.__state : undefined, hasMessageCheckbox: message ? message.hasCheckbox : false, isDeviceMobile: this.env.messaging.device.isMobile, - isMessageChecked: message && threadViewer + isMessageChecked: message && threadView ? message.isChecked(thread, threadStringifiedDomain) : false, message: message ? message.__state : undefined, @@ -71,7 +71,7 @@ class Message extends Component { originThread: originThread ? originThread.__state : undefined, partnerRoot: partnerRoot ? partnerRoot.__state : undefined, thread: thread ? thread.__state : undefined, - threadViewer: threadViewer ? threadViewer.__state : undefined, + threadView: threadView ? threadView.__state : undefined, }; }, { compareDepth: { @@ -268,10 +268,10 @@ class Message extends Component { } /** - * @returns {mail.thread_viewer} + * @returns {mail.thread_view} */ - get threadViewer() { - return this.env.models['mail.thread_viewer'].get(this.props.threadViewerLocalId); + get threadView() { + return this.env.models['mail.thread_view'].get(this.props.threadViewLocalId); } /** @@ -411,7 +411,7 @@ class Message extends Component { * @private */ _onChangeCheckbox() { - this.message.toggleCheck(this.threadViewer.thread, this.threadViewer.stringifiedDomain); + this.message.toggleCheck(this.threadView.thread, this.threadView.stringifiedDomain); } /** @@ -601,7 +601,7 @@ Object.assign(Message, { isSelected: Boolean, isSquashed: Boolean, messageLocalId: String, - threadViewerLocalId: { + threadViewLocalId: { type: String, optional: true, }, |
