diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-06 22:47:19 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-12 16:08:21 +0200 |
commit | 727e3f05df471548e590958168c52c474ab44e06 (patch) | |
tree | de80b6c523956795f3678aa474c67f6236aa541a /views/conversation/qml/View.qml | |
parent | 395f85b92f461923619fcf713f8029311630a8f2 (diff) | |
download | kube-727e3f05df471548e590958168c52c474ab44e06.tar.gz kube-727e3f05df471548e590958168c52c474ab44e06.zip |
A view search overlay
Diffstat (limited to 'views/conversation/qml/View.qml')
-rw-r--r-- | views/conversation/qml/View.qml | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/views/conversation/qml/View.qml b/views/conversation/qml/View.qml index 89e6379c..2a5e3d0c 100644 --- a/views/conversation/qml/View.qml +++ b/views/conversation/qml/View.qml | |||
@@ -29,6 +29,18 @@ Kube.View { | |||
29 | id: root | 29 | id: root |
30 | property alias currentAccount: accountFolderview.currentAccount | 30 | property alias currentAccount: accountFolderview.currentAccount |
31 | 31 | ||
32 | //We have to hardcode because all the mapToItem/mapFromItem functions are garbage | ||
33 | searchArea: Qt.rect(ApplicationWindow.window.sidebarWidth + mailListView.parent.x, 0, (mailView.x + mailView.width) - mailListView.parent.x, (mailView.y + mailView.height) - mailListView.y) | ||
34 | onFilterChanged: { | ||
35 | mailListView.filter = filter | ||
36 | Kube.Fabric.postMessage(Kube.Messages.searchString, {"searchString": filter}) | ||
37 | } | ||
38 | |||
39 | Kube.Listener { | ||
40 | filter: Kube.Messages.search | ||
41 | onMessageReceived: root.triggerSearch() | ||
42 | } | ||
43 | |||
32 | Shortcut { | 44 | Shortcut { |
33 | sequences: ['j'] | 45 | sequences: ['j'] |
34 | onActivated: Kube.Fabric.postMessage(Kube.Messages.selectNextConversation, {}) | 46 | onActivated: Kube.Fabric.postMessage(Kube.Messages.selectNextConversation, {}) |
@@ -156,12 +168,10 @@ Kube.View { | |||
156 | Layout.minimumWidth: Kube.Units.gridUnit * 10 | 168 | Layout.minimumWidth: Kube.Units.gridUnit * 10 |
157 | Kube.Listener { | 169 | Kube.Listener { |
158 | filter: Kube.Messages.folderSelection | 170 | filter: Kube.Messages.folderSelection |
159 | onMessageReceived: mailListView.parentFolder = message.folder | 171 | onMessageReceived: { |
160 | } | 172 | root.clearSearch() |
161 | 173 | mailListView.parentFolder = message.folder | |
162 | Kube.Listener { | 174 | } |
163 | filter: Kube.Messages.search | ||
164 | onMessageReceived: mailListView.showFilter = true | ||
165 | } | 175 | } |
166 | onCurrentMailChanged: { | 176 | onCurrentMailChanged: { |
167 | Kube.Fabric.postMessage(Kube.Messages.mailSelection, {"mail": currentMail}) | 177 | Kube.Fabric.postMessage(Kube.Messages.mailSelection, {"mail": currentMail}) |
@@ -210,5 +220,4 @@ Kube.View { | |||
210 | } | 220 | } |
211 | } | 221 | } |
212 | } | 222 | } |
213 | |||
214 | } | 223 | } |