From 727e3f05df471548e590958168c52c474ab44e06 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 6 Jul 2018 22:47:19 +0200 Subject: A view search overlay --- framework/qml/MailListView.qml | 51 +----------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) (limited to 'framework/qml/MailListView.qml') diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index 7e6f584d..998d9729 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml @@ -31,19 +31,10 @@ FocusScope { property bool isTrash : false property bool isUnread : false property variant currentMail: null - property bool showFilter: false - property string filter: null - - onFilterChanged: { - Kube.Fabric.postMessage(Kube.Messages.searchString, {"searchString": filter}) - } + property alias filter: mailListModel.filter onParentFolderChanged: { currentMail = null - filterField.clearSearch() - } - onShowFilterChanged: { - find.forceActiveFocus() } Kube.Listener { @@ -74,45 +65,6 @@ FocusScope { spacing: 0 - Rectangle { - id: filterField - Layout.fillWidth: true - height: Kube.Units.gridUnit * 2 - color: Kube.Colors.buttonColor - visible: root.showFilter - - function clearSearch() { - root.showFilter = false - find.text = "" - root.filter = "" - } - - RowLayout { - anchors { - verticalCenter: parent.verticalCenter - } - - width: parent.width - Kube.Units.smallSpacing - spacing: 0 - - Kube.IconButton { - iconName: Kube.Icons.remove - activeFocusOnTab: visible - onClicked: filterField.clearSearch() - } - - Kube.TextField { - id: find - Layout.fillWidth: true - placeholderText: qsTr("Filter...") - onTextChanged: root.filter = text - activeFocusOnTab: visible - focus: visible - Keys.onEscapePressed: filterField.clearSearch() - } - } - } - Kube.ListView { id: listView objectName: "listView" @@ -156,7 +108,6 @@ FocusScope { model: Kube.MailListModel { id: mailListModel parentFolder: root.parentFolder - filter: root.filter } delegate: Kube.ListDelegate { -- cgit v1.2.3