fix(ContactsListAndSearch): ensure component doesn't depend on `parent`

Also add default `height` as it otherwise breaks UI in other places.
This commit is contained in:
Pascal Precht 2021-07-15 13:12:46 +02:00 committed by Iuri Matias
parent 959c21990c
commit c0da840a87
4 changed files with 4 additions and 1 deletions

View File

@ -52,6 +52,7 @@ Item {
id: contactFieldAndList
anchors.top: sep.bottom
anchors.topMargin: Style.current.smallPadding
width: parent.width
showCheckbox: true
hideCommunityMembers: true
}

View File

@ -29,6 +29,7 @@ ModalPopup {
id: contactFieldAndList
anchors.top: parent.top
anchors.bottom: parent.bottom
width: parent.width
addContactEnabled: false
onUserClicked: function (isContact, pubKey, ensName) {
chatsModel.channelView.joinPrivateChat(pubKey, Utils.isChatKey(pubKey) ? "" : ensName);

View File

@ -46,6 +46,7 @@ Item {
id: contactFieldAndList
anchors.top: parent.top
anchors.bottom: parent.bottom
width: parent.width
showContactList: false
onUserClicked: function (isContact, pubKey, ensName, address) {
chatKey.text = address

View File

@ -22,7 +22,7 @@ Item {
property bool addContactEnabled: true
id: root
width: parent.width
height: childrenRect.height + 24
property var resolveENS: Backpressure.debounce(root, 500, function (ensName) {
noContactsRect.visible = false