diff --git a/addons/mail/static/src/components/discuss/discuss.js b/addons/mail/static/src/components/discuss/discuss.js index cfe680e0411..113e4a33748 100644 --- a/addons/mail/static/src/components/discuss/discuss.js +++ b/addons/mail/static/src/components/discuss/discuss.js @@ -41,13 +41,6 @@ export class Discuss extends LegacyComponent { // Public //-------------------------------------------------------------------------- - /** - * @returns {string} - */ - get addChannelInputPlaceholder() { - return this.env._t("Create or search channel..."); - } - /** * @returns {string} */ diff --git a/addons/mail/static/src/components/discuss/discuss.xml b/addons/mail/static/src/components/discuss/discuss.xml index b6f7441d0a6..8d0e14ce208 100644 --- a/addons/mail/static/src/components/discuss/discuss.xml +++ b/addons/mail/static/src/components/discuss/discuss.xml @@ -33,7 +33,7 @@ className="'o_Discuss_mobileAddItemHeaderInput'" isFocusOnMount="true" isHtml="discussView.discuss.isAddingChannel" - placeholder="discussView.discuss.isAddingChannel ? addChannelInputPlaceholder : addChatInputPlaceholder" + placeholder="discussView.discuss.isAddingChannel ? discuss.addChannelInputPlaceholder : addChatInputPlaceholder" select="_onMobileAddItemHeaderInputSelect" source="_onMobileAddItemHeaderInputSource" onHide="_onHideMobileAddItemHeader" diff --git a/addons/mail/static/src/models/discuss/discuss.js b/addons/mail/static/src/models/discuss/discuss.js index bc82af44bea..c3387a8d74a 100644 --- a/addons/mail/static/src/models/discuss/discuss.js +++ b/addons/mail/static/src/models/discuss/discuss.js @@ -232,6 +232,13 @@ registerModel({ } return this.threadToActiveId(this.thread); }, + /** + * @private + * @returns {string} + */ + _computeAddChannelInputPlaceholder() { + return this.env._t("Create or search channel..."); + }, /** * @private * @returns {string} @@ -336,6 +343,9 @@ registerModel({ activeMobileNavbarTabId: attr({ default: 'mailbox', }), + addChannelInputPlaceholder: attr({ + compute: '_computeAddChannelInputPlaceholder', + }), /** * Value that is used to create a channel from the sidebar. */