summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/thread_view
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/src/components/thread_view')
-rw-r--r--addons/mail/static/src/components/thread_view/thread_view.js7
-rw-r--r--addons/mail/static/src/components/thread_view/thread_view.xml2
2 files changed, 7 insertions, 2 deletions
diff --git a/addons/mail/static/src/components/thread_view/thread_view.js b/addons/mail/static/src/components/thread_view/thread_view.js
index 8a4898d6f3a..5b0f5f4a57a 100644
--- a/addons/mail/static/src/components/thread_view/thread_view.js
+++ b/addons/mail/static/src/components/thread_view/thread_view.js
@@ -20,7 +20,11 @@ class ThreadView extends Component {
constructor(...args) {
super(...args);
useShouldUpdateBasedOnProps();
- useStore((...args) => this._useStoreSelector(...args));
+ useStore((...args) => this._useStoreSelector(...args), {
+ compareDepth: {
+ threadTextInputSendShortcuts: 1,
+ },
+ });
useUpdate({ func: () => this._update() });
/**
* Reference of the composer. Useful to set focus on composer when
@@ -133,6 +137,7 @@ class ThreadView extends Component {
threadIsTemporary: thread && thread.isTemporary,
threadMassMailing: thread && thread.mass_mailing,
threadModel: thread && thread.model,
+ threadTextInputSendShortcuts: thread && thread.textInputSendShortcuts || [],
threadView,
threadViewIsLoading: threadView && threadView.isLoading,
};
diff --git a/addons/mail/static/src/components/thread_view/thread_view.xml b/addons/mail/static/src/components/thread_view/thread_view.xml
index 99c78279adc..495408cc8f6 100644
--- a/addons/mail/static/src/components/thread_view/thread_view.xml
+++ b/addons/mail/static/src/components/thread_view/thread_view.xml
@@ -38,7 +38,7 @@
isDoFocus="props.isDoFocus"
showAttachmentsExtensions="props.showComposerAttachmentsExtensions"
showAttachmentsFilenames="props.showComposerAttachmentsFilenames"
- textInputSendShortcuts="(threadView.thread.model === 'mail.channel' and threadView.thread.mass_mailing) ? ['ctrl-enter', 'meta-enter'] : ['enter']"
+ textInputSendShortcuts="threadView.textInputSendShortcuts"
t-ref="composer"
/>
</t>