fix: channel/communities list height depending on search string
This commit is contained in:
parent
2ed3261170
commit
04845e3a8e
|
@ -10,16 +10,13 @@ Item {
|
||||||
property string searchStr: ""
|
property string searchStr: ""
|
||||||
id: root
|
id: root
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: childrenRect.height
|
height: Math.max(communityListView.height, noSearchResults.height)
|
||||||
visible: communityListView.visible
|
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: communityListView
|
id: communityListView
|
||||||
spacing: Style.current.halfPadding
|
spacing: Style.current.halfPadding
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
// FIXME the height doesn't update
|
visible: height > 10
|
||||||
// visible: height > 0
|
|
||||||
width:parent.width
|
width:parent.width
|
||||||
interactive: false
|
interactive: false
|
||||||
model: chatsModel.joinedCommunities
|
model: chatsModel.joinedCommunities
|
||||||
|
|
|
@ -47,7 +47,7 @@ Rectangle {
|
||||||
// Hide the box if it is filtered out
|
// Hide the box if it is filtered out
|
||||||
property bool isVisible: searchStr === "" || name.includes(searchStr)
|
property bool isVisible: searchStr === "" || name.includes(searchStr)
|
||||||
visible: isVisible ? true : false
|
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 {
|
StatusIdenticon {
|
||||||
id: contactImage
|
id: contactImage
|
||||||
|
|
|
@ -23,7 +23,7 @@ Rectangle {
|
||||||
spacing: Style.current.halfPadding
|
spacing: Style.current.halfPadding
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
visible: height > 0
|
visible: height > 50
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
interactive: false
|
interactive: false
|
||||||
|
|
Loading…
Reference in New Issue