From e2bb81885f4e47c1211e7d3ca2a1a2f74d5d4466 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 6 Oct 2020 11:24:51 +0200 Subject: [PATCH] feat(Chat): show 'no search results' message Closes #1081 --- .../Chat/ContactsColumn/ChannelList.qml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/ContactsColumn/ChannelList.qml b/ui/app/AppLayouts/Chat/ContactsColumn/ChannelList.qml index c15e87be0e..d98b7626ad 100644 --- a/ui/app/AppLayouts/Chat/ContactsColumn/ChannelList.qml +++ b/ui/app/AppLayouts/Chat/ContactsColumn/ChannelList.qml @@ -30,6 +30,7 @@ ScrollView { id: chatGroupsListView anchors.top: parent.top height: childrenRect.height + visible: height > 0 anchors.right: parent.right anchors.left: parent.left anchors.rightMargin: Style.current.padding @@ -65,9 +66,27 @@ ScrollView { } } + Rectangle { + id: noSearchResults + anchors.top: parent.top + height: 300 + color: "transparent" + visible: !chatGroupsListView.visible && chatGroupsContainer.searchStr !== "" + anchors.left: parent.left + anchors.right: parent.right + + StyledText { + font.pixelSize: 15 + color: Style.current.darkGrey + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("No search results") + } + } + EmptyView { width: parent.width - anchors.top: chatGroupsListView.bottom + anchors.top: noSearchResults.visible ? noSearchResults.bottom : chatGroupsListView.bottom anchors.topMargin: Style.current.smallPadding }