fix(@desktop/profile): handle empty text in add contact properly
fixes #3046 also fix the fact that the query is only triggered when the text is changed vs when pressing any key
This commit is contained in:
parent
9893dbb00c
commit
b3ea8f9502
|
@ -159,8 +159,11 @@ Item {
|
|||
placeholderText: qsTrId("enter-contact-code")
|
||||
customHeight: 44
|
||||
fontPixelSize: 15
|
||||
Keys.onReleased: {
|
||||
if (text !== "") {
|
||||
onTextEdited: {
|
||||
if (addContactSearchInput.text === "") {
|
||||
searchResults.reset();
|
||||
return;
|
||||
}
|
||||
if (!addContactModal.validate(addContactSearchInput.text)) {
|
||||
searchResults.reset();
|
||||
contactsContainer.isPending = false;
|
||||
|
@ -168,9 +171,6 @@ Item {
|
|||
}
|
||||
|
||||
Qt.callLater(addContactModal.lookupContact, addContactSearchInput.text);
|
||||
} else {
|
||||
addContactModal.validationError = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue