fix(@desktop/channels): allow capitals in channel name
This commit is contained in:
parent
601d3dd0f1
commit
cb924053c6
|
@ -108,7 +108,7 @@ StatusDialog {
|
|||
|
||||
input.onTextChanged: {
|
||||
const cursorPosition = input.cursorPosition
|
||||
input.text = Utils.convertSpacesToDashesAndUpperToLowerCase(input.text)
|
||||
input.text = Utils.convertSpacesToDashes(input.text)
|
||||
input.cursorPosition = cursorPosition
|
||||
if (root.channelEmoji === "") {
|
||||
input.letterIconName = text;
|
||||
|
|
|
@ -332,15 +332,9 @@ QtObject {
|
|||
return (/[A-Z]/.test(str))
|
||||
}
|
||||
|
||||
function convertSpacesToDashesAndUpperToLowerCase(str)
|
||||
function convertSpacesToDashes(str)
|
||||
{
|
||||
if (str.includes(" "))
|
||||
str = str.replace(/ /g, "-")
|
||||
|
||||
if(hasUpperCaseLetter(str))
|
||||
str = str.toLowerCase()
|
||||
|
||||
return str
|
||||
return str.replace(/ /g, "-")
|
||||
}
|
||||
|
||||
/* Validation section start */
|
||||
|
|
Loading…
Reference in New Issue