From 5c83fc5e9940ef3a2999076042828e08b330fe5c Mon Sep 17 00:00:00 2001 From: Rahul Prajapati Date: Thu, 22 Dec 2022 12:35:57 +0000 Subject: [PATCH] [IMP] mail: push to talk key display for space key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PURPOSE: When the push to talk key is the "space" we show an "empty string", which is very confusing and not very clear. SPECIFICATION: We display `Space` string instead of empty space. Task-2794733 closes odoo/odoo#108573 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/models/user_setting.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/models/user_setting.js b/addons/mail/static/src/models/user_setting.js index 00cde9c6e57..0761c825c72 100644 --- a/addons/mail/static/src/models/user_setting.js +++ b/addons/mail/static/src/models/user_setting.js @@ -74,7 +74,7 @@ Model({ pushToTalkKeyToString() { const { shiftKey, ctrlKey, altKey, key } = this.pushToTalkKeyFormat(); const f = (k, name) => (k ? name : ""); - return `${f(ctrlKey, "Ctrl + ")}${f(altKey, "Alt + ")}${f(shiftKey, "Shift + ")}${key}`; + return `${f(ctrlKey, "Ctrl + ")}${f(altKey, "Alt + ")}${f(shiftKey, "Shift + ")}${key === " " ? "Space" : key}`; }, /** * @param {String} audioInputDeviceId