summaryrefslogtreecommitdiffstats
path: root/views/conversation/qml/View.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-21 11:00:29 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-21 11:00:29 +0200
commit3d4c249184ae3f7a2be8c0a7271482bc2aff8de8 (patch)
tree44f7dc5285a5e0ccae97bc8cc796f636237c1685 /views/conversation/qml/View.qml
parent0b973d5af8a33e9542c8364dfb3ae59ace64821b (diff)
downloadkube-3d4c249184ae3f7a2be8c0a7271482bc2aff8de8.tar.gz
kube-3d4c249184ae3f7a2be8c0a7271482bc2aff8de8.zip
Use the refresh signal in the conversation view as well.
Diffstat (limited to 'views/conversation/qml/View.qml')
-rw-r--r--views/conversation/qml/View.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/views/conversation/qml/View.qml b/views/conversation/qml/View.qml
index 44208fa5..81d5e9cb 100644
--- a/views/conversation/qml/View.qml
+++ b/views/conversation/qml/View.qml
@@ -28,14 +28,25 @@ import org.kube.framework 1.0 as Kube
28Kube.View { 28Kube.View {
29 id: root 29 id: root
30 property alias currentAccount: accountFolderview.currentAccount 30 property alias currentAccount: accountFolderview.currentAccount
31 property alias currentFolder: accountFolderview.currentFolder
31 32
32 //We have to hardcode because all the mapToItem/mapFromItem functions are garbage 33 //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 searchArea: Qt.rect(ApplicationWindow.window.sidebarWidth + mailListView.parent.x, 0, (mailView.x + mailView.width) - mailListView.parent.x, (mailView.y + mailView.height) - mailListView.y)
35
34 onFilterChanged: { 36 onFilterChanged: {
35 mailListView.filter = filter 37 mailListView.filter = filter
36 Kube.Fabric.postMessage(Kube.Messages.searchString, {"searchString": filter}) 38 Kube.Fabric.postMessage(Kube.Messages.searchString, {"searchString": filter})
37 } 39 }
38 40
41 onRefresh: {
42 if (!!root.currentFolder) {
43 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"folder": root.currentFolder});
44 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": root.currentAccount, "type": "folder"})
45 } else {
46 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": root.currentAccount})
47 }
48 }
49
39 Kube.Listener { 50 Kube.Listener {
40 filter: Kube.Messages.search 51 filter: Kube.Messages.search
41 onMessageReceived: root.triggerSearch() 52 onMessageReceived: root.triggerSearch()