chore(chat/MembersSelector): display "no results" when not found

fixes: #7495
This commit is contained in:
Patryk Osmaczko 2022-11-07 10:51:51 +01:00 committed by r4bbit.eth
parent ed4ecb17bb
commit 3b866c2ff6
1 changed files with 17 additions and 6 deletions

View File

@ -199,7 +199,7 @@ Item {
parent: edit
x: (parent.contentWidth - Style.current.halfPadding)
y: (parent.height + Style.current.halfPadding)
visible: edit.text !== "" && root.suggestionsModel.count
visible: edit.text !== ""
padding: Style.current.halfPadding
background: StatusDialogBackground {
id: bg
@ -215,12 +215,23 @@ Item {
}
}
StatusListView {
id: suggestionsListView
ColumnLayout {
anchors.fill: parent
implicitWidth: contentItem.childrenRect.width
implicitHeight: contentItem.childrenRect.height
onVisibleChanged: currentIndex = 0
StatusBaseText {
visible: root.suggestionsModel.count === 0
text: qsTr("No results found")
color: Theme.palette.baseColor1
}
StatusListView {
id: suggestionsListView
visible: root.suggestionsModel.count
implicitWidth: contentItem.childrenRect.width
implicitHeight: contentItem.childrenRect.height
onVisibleChanged: currentIndex = 0
}
}
}
}