fix: channel/communities list height depending on search string

This commit is contained in:
Richard Ramos 2020-12-15 14:23:54 -04:00 committed by Iuri Matias
parent 2ed3261170
commit 04845e3a8e
3 changed files with 4 additions and 7 deletions

View File

@ -10,16 +10,13 @@ Item {
property string searchStr: ""
id: root
width: parent.width
height: childrenRect.height
visible: communityListView.visible
height: Math.max(communityListView.height, noSearchResults.height)
ListView {
id: communityListView
spacing: Style.current.halfPadding
anchors.top: parent.top
height: childrenRect.height
// FIXME the height doesn't update
// visible: height > 0
visible: height > 10
width:parent.width
interactive: false
model: chatsModel.joinedCommunities

View File

@ -47,7 +47,7 @@ Rectangle {
// Hide the box if it is filtered out
property bool isVisible: searchStr === "" || name.includes(searchStr)
visible: isVisible ? true : false
height: isVisible ? !isCompact ? 64 : contactImage.height + Style.current.smallPadding * 2 : 0
height: isVisible ? (!isCompact ? 64 : contactImage.height + Style.current.smallPadding * 2) : 0
StatusIdenticon {
id: contactImage

View File

@ -23,7 +23,7 @@ Rectangle {
spacing: Style.current.halfPadding
anchors.top: parent.top
height: childrenRect.height
visible: height > 0
visible: height > 50
anchors.right: parent.right
anchors.left: parent.left
interactive: false