fix(@desktop/profile): Confirmation of contact added not shown on Add Contact Modal

fixes #4072
This commit is contained in:
Khushboo Mehta 2021-11-11 17:09:38 +01:00 committed by Sale Djenic
parent eee096dda7
commit 1e30872a96
2 changed files with 8 additions and 1 deletions

View File

@ -255,6 +255,9 @@ Item {
hideBlocked: true
searchString: searchBox.text
// To show the correct status (added/not added)in the addContactModal.
onCountChanged: searchResults.isAddedContact = searchResults.isContactAdded()
onContactClicked: {
root.store.changeAppSectionBySectionType(Constants.appSection.chat)
root.store.joinPrivateChat(contact.address)

View File

@ -28,7 +28,7 @@ Item {
property bool resultClickable: true
property bool addContactEnabled: true
property bool isAddedContact: pubKey != "" ? chatsModel.messageView.isAddedContact(pubKey) : false
property bool isAddedContact: isContactAdded()
signal resultClicked(string pubKey)
signal addToContactsButtonClicked(string pubKey)
@ -41,6 +41,10 @@ Item {
pubKey = ""
}
function isContactAdded() {
return pubKey != "" ? chatsModel.messageView.isAddedContact(pubKey) : false
}
width: parent.width
StyledText {