From b1df4625c1613137c2c8e2a43c81b3441661615c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 2 Jul 2017 23:20:56 +0200 Subject: Fixed triggering of DAV sync --- components/kube/contents/ui/Kube.qml | 7 +++++++ framework/qml/People.qml | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml index c6fbffb9..095e51e1 100644 --- a/components/kube/contents/ui/Kube.qml +++ b/components/kube/contents/ui/Kube.qml @@ -201,6 +201,13 @@ Controls2.ApplicationWindow { kubeViews.push(composerView, {message: mail, loadAsDraft: openAsDraft}, Controls2.StackView.Immediate) } + onCurrentItemChanged: { + //TODO with qt 5.8 use Controls2.StackView.onActivated + if (currentItem == peopleView) { + Kube.Fabric.postMessage(Kube.Messages.synchronize, {"type": "contacts"}) + } + } + //These items are not visible until pushed onto the stack, so we keep them in resources instead of items resources: [ //Not components so we maintain state diff --git a/framework/qml/People.qml b/framework/qml/People.qml index 7f36193e..f4285f24 100644 --- a/framework/qml/People.qml +++ b/framework/qml/People.qml @@ -30,12 +30,6 @@ Item { property var currentContact - onVisibleChanged: { - if (visible) { - Kube.Fabric.postMessage(Kube.Messages.synchronize, {"type": "contacts"}); - } - } - Item { id: peopleRoot -- cgit v1.2.3