From c0da840a8793d9f4cb6490e37bdbf30e338ff620 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Thu, 15 Jul 2021 13:12:46 +0200 Subject: [PATCH] fix(ContactsListAndSearch): ensure component doesn't depend on `parent` Also add default `height` as it otherwise breaks UI in other places. --- .../CommunityProfilePopupInviteFriendsView.qml | 1 + ui/app/AppLayouts/Chat/components/PrivateChatPopup.qml | 1 + ui/shared/AddressInput.qml | 1 + ui/shared/ContactsListAndSearch.qml | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupInviteFriendsView.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupInviteFriendsView.qml index 6ea32f44e0..16e56885af 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupInviteFriendsView.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupInviteFriendsView.qml @@ -52,6 +52,7 @@ Item { id: contactFieldAndList anchors.top: sep.bottom anchors.topMargin: Style.current.smallPadding + width: parent.width showCheckbox: true hideCommunityMembers: true } diff --git a/ui/app/AppLayouts/Chat/components/PrivateChatPopup.qml b/ui/app/AppLayouts/Chat/components/PrivateChatPopup.qml index 86aef8681d..fc19d47250 100644 --- a/ui/app/AppLayouts/Chat/components/PrivateChatPopup.qml +++ b/ui/app/AppLayouts/Chat/components/PrivateChatPopup.qml @@ -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); diff --git a/ui/shared/AddressInput.qml b/ui/shared/AddressInput.qml index c6c572d4ef..01c7e5e36a 100644 --- a/ui/shared/AddressInput.qml +++ b/ui/shared/AddressInput.qml @@ -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 diff --git a/ui/shared/ContactsListAndSearch.qml b/ui/shared/ContactsListAndSearch.qml index 3cb3834f4f..0cf2e2b78f 100644 --- a/ui/shared/ContactsListAndSearch.qml +++ b/ui/shared/ContactsListAndSearch.qml @@ -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