summaryrefslogtreecommitdiffstats
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
parent0b973d5af8a33e9542c8364dfb3ae59ace64821b (diff)
downloadkube-3d4c249184ae3f7a2be8c0a7271482bc2aff8de8.tar.gz
kube-3d4c249184ae3f7a2be8c0a7271482bc2aff8de8.zip
Use the refresh signal in the conversation view as well.
-rw-r--r--components/kube/qml/Kube.qml6
-rw-r--r--framework/qml/InlineAccountSwitcher.qml5
-rw-r--r--views/conversation/qml/View.qml11
3 files changed, 15 insertions, 7 deletions
diff --git a/components/kube/qml/Kube.qml b/components/kube/qml/Kube.qml
index 17e77ebe..f8698570 100644
--- a/components/kube/qml/Kube.qml
+++ b/components/kube/qml/Kube.qml
@@ -107,12 +107,6 @@ Controls2.ApplicationWindow {
107 if (kubeViews.currentItem && kubeViews.currentItem.refresh) { 107 if (kubeViews.currentItem && kubeViews.currentItem.refresh) {
108 kubeViews.currentItem.refresh() 108 kubeViews.currentItem.refresh()
109 } 109 }
110 if (!!app.currentFolder) {
111 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"folder": app.currentFolder});
112 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": app.currentAccount, "type": "folder"})
113 } else {
114 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": app.currentAccount})
115 }
116 } 110 }
117 } 111 }
118 //END Shortcuts 112 //END Shortcuts
diff --git a/framework/qml/InlineAccountSwitcher.qml b/framework/qml/InlineAccountSwitcher.qml
index 2af1a455..e54049be 100644
--- a/framework/qml/InlineAccountSwitcher.qml
+++ b/framework/qml/InlineAccountSwitcher.qml
@@ -27,6 +27,8 @@ FocusScope {
27 Kube.Fabric.postMessage(Kube.Messages.accountSelection, {accountId: currentAccount}); 27 Kube.Fabric.postMessage(Kube.Messages.accountSelection, {accountId: currentAccount});
28 } 28 }
29 29
30 property var currentFolder
31
30 ColumnLayout { 32 ColumnLayout {
31 id: layout 33 id: layout
32 anchors.fill: parent 34 anchors.fill: parent
@@ -95,7 +97,8 @@ FocusScope {
95 onActivated: { 97 onActivated: {
96 if (visible) { 98 if (visible) {
97 Kube.Fabric.postMessage(Kube.Messages.folderSelection, {"folder": model.data(index, Kube.FolderListModel.DomainObject), 99 Kube.Fabric.postMessage(Kube.Messages.folderSelection, {"folder": model.data(index, Kube.FolderListModel.DomainObject),
98 "trash": model.data(index, Kube.FolderListModel.Trash)}); 100 "trash": model.data(index, Kube.FolderListModel.Trash)})
101 root.currentFolder = model.data(index, Kube.FolderListModel.DomainObject)
99 } 102 }
100 } 103 }
101 } 104 }
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()