Updated group naming functionality. Fixes #1693

This commit is contained in:
staked-smart-ace 2021-01-21 00:56:38 +04:00 committed by Iuri Matias
parent 64a0710897
commit 5b3d202797
2 changed files with 9 additions and 0 deletions

View File

@ -66,6 +66,10 @@ ModalPopup {
popup.close();
}
function groupNameFilter(text) {
groupName.text = text.toLowerCase().replace(' ', '-');
}
header: Item {
height: 30
width: parent.width
@ -104,6 +108,10 @@ ModalPopup {
placeholderText: qsTrId("group-name")
visible: !selectChatMembers
validationError: channelNameValidationError
onTextEdited: function (text) {
groupNameFilter(text)
}
validator: RegExpValidator { regExp: /^[a-zA-Z0-9\-\ ]+$/ }
}
NoFriendsRectangle {

View File

@ -28,6 +28,7 @@ Item {
readonly property int labelMargin: 7
property int customHeight: 44
property int fontPixelSize: 15
property alias validator: inputValue.validator
signal editingFinished(string inputValue)
signal textEdited(string inputValue)