From dea2da8b254bf3b004e9db24134f6079ebb87db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Tue, 15 Mar 2022 12:42:49 +0000 Subject: [PATCH] [IMP] mail: turn 'Discuss/addChatInputPlaceholder' into field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-2793280 closes odoo/odoo#86443 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/components/discuss/discuss.js | 7 ------- addons/mail/static/src/components/discuss/discuss.xml | 2 +- addons/mail/static/src/models/discuss.js | 10 ++++++++++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/addons/mail/static/src/components/discuss/discuss.js b/addons/mail/static/src/components/discuss/discuss.js index 113e4a33748..77152194d26 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 addChatInputPlaceholder() { - return this.env._t("Search user..."); - } - /** * @returns {DiscussView} */ diff --git a/addons/mail/static/src/components/discuss/discuss.xml b/addons/mail/static/src/components/discuss/discuss.xml index fbdc9e944f4..5b3a90c0fc5 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 ? discuss.addChannelInputPlaceholder : addChatInputPlaceholder" + placeholder="discussView.discuss.isAddingChannel ? discussView.discuss.addChannelInputPlaceholder : discussView.discuss.addChatInputPlaceholder" select="_onMobileAddItemHeaderInputSelect" source="_onMobileAddItemHeaderInputSource" onHide="_onHideMobileAddItemHeader" diff --git a/addons/mail/static/src/models/discuss.js b/addons/mail/static/src/models/discuss.js index c3387a8d74a..fc2075f63db 100644 --- a/addons/mail/static/src/models/discuss.js +++ b/addons/mail/static/src/models/discuss.js @@ -239,6 +239,13 @@ registerModel({ _computeAddChannelInputPlaceholder() { return this.env._t("Create or search channel..."); }, + /** + * @private + * @returns {string} + */ + _computeAddChatInputPlaceholder() { + return this.env._t("Search user..."); + }, /** * @private * @returns {string} @@ -346,6 +353,9 @@ registerModel({ addChannelInputPlaceholder: attr({ compute: '_computeAddChannelInputPlaceholder', }), + addChatInputPlaceholder: attr({ + compute: '_computeAddChatInputPlaceholder', + }), /** * Value that is used to create a channel from the sidebar. */