[IMP] mail: push to talk key display for space key

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) <aku@odoo.com>
This commit is contained in:
Rahul Prajapati
2022-12-23 12:11:11 +01:00
parent 8efee64757
commit 5c83fc5e99
@@ -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