summaryrefslogtreecommitdiffstats
path: root/framework/qml/FolderListView.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-25 14:16:41 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-25 14:16:41 +0200
commit629e354ebc7d8b19ddd57f9da2a3538eea27f148 (patch)
tree487592f6f40b7c4ce1c6d8811bf5aba18858fb4e /framework/qml/FolderListView.qml
parentc039ff7a80ff99d0265605f839154ac096824ff3 (diff)
downloadkube-629e354ebc7d8b19ddd57f9da2a3538eea27f148.tar.gz
kube-629e354ebc7d8b19ddd57f9da2a3538eea27f148.zip
Only select a folder if a user triggered it
This avoids selecting all folders once during initial loading of the model
Diffstat (limited to 'framework/qml/FolderListView.qml')
-rw-r--r--framework/qml/FolderListView.qml14
1 files changed, 8 insertions, 6 deletions
diff --git a/framework/qml/FolderListView.qml b/framework/qml/FolderListView.qml
index 42841221..c2e7f052 100644
--- a/framework/qml/FolderListView.qml
+++ b/framework/qml/FolderListView.qml
@@ -51,13 +51,15 @@ Rectangle {
51 accountId: root.accountId 51 accountId: root.accountId
52 } 52 }
53 53
54 onCurrentIndexChanged: { 54 onActivated: {
55 model.fetchMore(currentIndex) 55 //TODO do some event compression in case of double clicks
56 Kube.Fabric.postMessage(Kube.Messages.folderSelection, {"folder":model.data(currentIndex, Kube.FolderListModel.DomainObject), 56 model.fetchMore(currentIndex);
57 "trash":model.data(currentIndex, Kube.FolderListModel.Trash)}) 57 Kube.Fabric.postMessage(Kube.Messages.folderSelection, {"folder": model.data(index, Kube.FolderListModel.DomainObject),
58 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"folder":model.data(currentIndex, Kube.FolderListModel.DomainObject)}) 58 "trash": model.data(index, Kube.FolderListModel.Trash)});
59 console.error(model.data) 59 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"folder": model.data(index, Kube.FolderListModel.DomainObject)});
60 } 60 }
61 //Forward the signal because on a desktopsystem activated is only triggerd by double clicks
62 onClicked: treeView.activated(index)
61 63
62 alternatingRowColors: false 64 alternatingRowColors: false
63 headerVisible: false 65 headerVisible: false