fix(@desktop/chat): Hide add contact button on private chat
fixes #2595
This commit is contained in:
parent
869ae63518
commit
66a0611d91
|
@ -29,6 +29,7 @@ ModalPopup {
|
|||
id: contactFieldAndList
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
addContactEnabled: false
|
||||
onUserClicked: function (isContact, pubKey, ensName) {
|
||||
chatsModel.channelView.joinPrivateChat(pubKey, Utils.isChatKey(pubKey) ? "" : ensName);
|
||||
popup.close();
|
||||
|
|
|
@ -19,6 +19,7 @@ Item {
|
|||
signal userClicked(bool isContact, string pubKey, string ensName, string address)
|
||||
property var pubKeys: ([])
|
||||
property bool hideCommunityMembers: false
|
||||
property bool addContactEnabled: true
|
||||
|
||||
id: root
|
||||
width: parent.width
|
||||
|
@ -175,7 +176,7 @@ Item {
|
|||
hasExistingContacts: existingContacts.visible
|
||||
loading: false
|
||||
width: searchResultsWidth > 0 ? searchResultsWidth : parent.width
|
||||
|
||||
addContactEnabled: root.addContactEnabled
|
||||
onResultClicked: {
|
||||
if (!validate()) {
|
||||
return
|
||||
|
|
|
@ -19,6 +19,7 @@ Item {
|
|||
property string pubKey: ""
|
||||
property string address: ""
|
||||
property bool resultClickable: true
|
||||
property bool addContactEnabled: true
|
||||
|
||||
property bool isAddedContact: pubKey != "" ? chatsModel.messageView.isAddedContact(pubKey) : false
|
||||
|
||||
|
@ -120,7 +121,7 @@ Item {
|
|||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: !isAddedContact && !checkIcon.visible
|
||||
visible: addContactEnabled && !isAddedContact && !checkIcon.visible
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
|
Loading…
Reference in New Issue