fix(ProfileContextMenu): do not display extra Send CR when pending

- do not display the "Send contact request" menu item when we've already
sent one; happened because now we have an enum for the contact request
state
This commit is contained in:
Lukáš Tinkl 2024-04-19 00:10:45 +02:00 committed by Lukáš Tinkl
parent eae2489254
commit 38d6b694fb
1 changed files with 3 additions and 2 deletions

View File

@ -148,8 +148,9 @@ StatusMenu {
SendContactRequestMenuItem {
id: sendContactRequestMenuItem
objectName: "sendContactRequest_StatusItem"
enabled: !root.isMe && !root.isContact
&& !root.isBlockedContact && !root.hasPendingContactRequest && !root.isBridgedAccount
enabled: !root.isMe && !root.isContact && !root.isBlockedContact
&& (contactDetails.contactRequestState === Constants.ContactRequestState.None || contactDetails.contactRequestState === Constants.ContactRequestState.Dismissed)
&& !root.isBridgedAccount
onTriggered: Global.openContactRequestPopup(root.selectedUserPublicKey, root.contactDetails, null)
}