From 3b866c2ff6dafa275a61a9014cfb3aa94ff033e5 Mon Sep 17 00:00:00 2001 From: Patryk Osmaczko Date: Mon, 7 Nov 2022 10:51:51 +0100 Subject: [PATCH] chore(chat/MembersSelector): display "no results" when not found fixes: #7495 --- .../Chat/panels/InlineSelectorPanel.qml | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ui/app/AppLayouts/Chat/panels/InlineSelectorPanel.qml b/ui/app/AppLayouts/Chat/panels/InlineSelectorPanel.qml index f947eb92c9..749b2736b8 100644 --- a/ui/app/AppLayouts/Chat/panels/InlineSelectorPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/InlineSelectorPanel.qml @@ -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 + } } } }