From 3d4c249184ae3f7a2be8c0a7271482bc2aff8de8 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 21 Aug 2018 11:00:29 +0200 Subject: Use the refresh signal in the conversation view as well. --- views/conversation/qml/View.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'views/conversation') 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 Kube.View { id: root property alias currentAccount: accountFolderview.currentAccount + property alias currentFolder: accountFolderview.currentFolder //We have to hardcode because all the mapToItem/mapFromItem functions are garbage searchArea: Qt.rect(ApplicationWindow.window.sidebarWidth + mailListView.parent.x, 0, (mailView.x + mailView.width) - mailListView.parent.x, (mailView.y + mailView.height) - mailListView.y) + onFilterChanged: { mailListView.filter = filter Kube.Fabric.postMessage(Kube.Messages.searchString, {"searchString": filter}) } + onRefresh: { + if (!!root.currentFolder) { + Kube.Fabric.postMessage(Kube.Messages.synchronize, {"folder": root.currentFolder}); + Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": root.currentAccount, "type": "folder"}) + } else { + Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": root.currentAccount}) + } + } + Kube.Listener { filter: Kube.Messages.search onMessageReceived: root.triggerSearch() -- cgit v1.2.3