diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-24 15:34:31 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-24 15:34:31 +0200 |
commit | 74703d12ef6f72a057f11957181b6cf6f4730e2d (patch) | |
tree | a9126fd02863243e26fdc2881b3910b163d59c87 /framework/qml/FolderListView.qml | |
parent | 68ed477e34756beb5b152f8077c2e2527bba4708 (diff) | |
download | kube-74703d12ef6f72a057f11957181b6cf6f4730e2d.tar.gz kube-74703d12ef6f72a057f11957181b6cf6f4730e2d.zip |
Added the Fabric as an in application message bus
Diffstat (limited to 'framework/qml/FolderListView.qml')
-rw-r--r-- | framework/qml/FolderListView.qml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/framework/qml/FolderListView.qml b/framework/qml/FolderListView.qml index 4082e08d..78d3c5d0 100644 --- a/framework/qml/FolderListView.qml +++ b/framework/qml/FolderListView.qml | |||
@@ -26,18 +26,18 @@ import org.kube.framework 1.0 as Kube | |||
26 | Rectangle { | 26 | Rectangle { |
27 | id: root | 27 | id: root |
28 | 28 | ||
29 | property variant currentFolder: null | ||
30 | property variant accountId | 29 | property variant accountId |
31 | property bool isTrashFolder: false | ||
32 | 30 | ||
33 | color: Kube.Colors.textColor | 31 | color: Kube.Colors.textColor |
34 | 32 | ||
35 | Kube.FolderController { | 33 | Kube.FolderController { |
36 | id: folderController | 34 | id: folderController |
37 | Binding on folder { | 35 | } |
38 | //!! checks for the availability of the type | 36 | Kube.Listener { |
39 | when: !!root.currentFolder | 37 | id: controllerListener |
40 | value: root.currentFolder | 38 | filter: Kube.Messages.folderSelection |
39 | onMessageReceived: { | ||
40 | folderController.folder = message.folder | ||
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
@@ -64,8 +64,8 @@ Rectangle { | |||
64 | 64 | ||
65 | onCurrentIndexChanged: { | 65 | onCurrentIndexChanged: { |
66 | model.fetchMore(currentIndex) | 66 | model.fetchMore(currentIndex) |
67 | root.currentFolder = model.data(currentIndex, Kube.FolderListModel.DomainObject) | 67 | Kube.Fabric.postMessage(Kube.Messages.folderSelection, {"folder":model.data(currentIndex, Kube.FolderListModel.DomainObject), |
68 | root.isTrashFolder = model.data(currentIndex, Kube.FolderListModel.Trash) | 68 | "trash":model.data(currentIndex, Kube.FolderListModel.Trash)}) |
69 | folderController.synchronizeAction.execute() | 69 | folderController.synchronizeAction.execute() |
70 | console.error(model.data) | 70 | console.error(model.data) |
71 | } | 71 | } |