From 4fbaad6d3a14326641669c0614f9acba82572d9a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 23 Jan 2018 22:35:14 +0100 Subject: We need to react to accountId even if the uiPath doesn't change. E.g. if we have two kolabnow accounts. --- framework/qml/EditAccount.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'framework') diff --git a/framework/qml/EditAccount.qml b/framework/qml/EditAccount.qml index 2c73617f..c08e0c26 100644 --- a/framework/qml/EditAccount.qml +++ b/framework/qml/EditAccount.qml @@ -76,7 +76,12 @@ Item { } height: item ? item.implicitHeight : 0 source: accountFactory.uiPath - onLoaded: item.accountId = root.accountId + Binding { + target: loader.item + property: "accountId" + value: root.accountId + when: loader.status == Loader.Ready + } } Kube.Button { visible: accountFactory.requiresKeyring @@ -84,7 +89,7 @@ Item { text: qsTr("Change Password") onClicked: { Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) - Kube.Fabric.postMessage(Kube.Messages.requestLogin, {"accountId": loader.item.accountIdentifier}) + Kube.Fabric.postMessage(Kube.Messages.requestLogin, {"accountId": loader.item.accountId}) } } } @@ -130,7 +135,7 @@ Item { onClicked: { if(loader.item.valid) { loader.item.save() - Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": loader.item.accountIdentifier}); + Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": loader.item.accountId}); Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) } else { console.warn("Invalid settings."); -- cgit v1.2.3