summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-23 22:35:14 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-23 22:35:14 +0100
commit4fbaad6d3a14326641669c0614f9acba82572d9a (patch)
treece8426d148b950f2992317b171f5908741844d4e
parent99fd74cff4a239f803a70698d69ac581ad6f97be (diff)
downloadkube-4fbaad6d3a14326641669c0614f9acba82572d9a.tar.gz
kube-4fbaad6d3a14326641669c0614f9acba82572d9a.zip
We need to react to accountId even if the uiPath doesn't change.
E.g. if we have two kolabnow accounts.
-rw-r--r--framework/qml/EditAccount.qml11
1 files changed, 8 insertions, 3 deletions
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 {
76 } 76 }
77 height: item ? item.implicitHeight : 0 77 height: item ? item.implicitHeight : 0
78 source: accountFactory.uiPath 78 source: accountFactory.uiPath
79 onLoaded: item.accountId = root.accountId 79 Binding {
80 target: loader.item
81 property: "accountId"
82 value: root.accountId
83 when: loader.status == Loader.Ready
84 }
80 } 85 }
81 Kube.Button { 86 Kube.Button {
82 visible: accountFactory.requiresKeyring 87 visible: accountFactory.requiresKeyring
@@ -84,7 +89,7 @@ Item {
84 text: qsTr("Change Password") 89 text: qsTr("Change Password")
85 onClicked: { 90 onClicked: {
86 Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) 91 Kube.Fabric.postMessage(Kube.Messages.componentDone, {})
87 Kube.Fabric.postMessage(Kube.Messages.requestLogin, {"accountId": loader.item.accountIdentifier}) 92 Kube.Fabric.postMessage(Kube.Messages.requestLogin, {"accountId": loader.item.accountId})
88 } 93 }
89 } 94 }
90 } 95 }
@@ -130,7 +135,7 @@ Item {
130 onClicked: { 135 onClicked: {
131 if(loader.item.valid) { 136 if(loader.item.valid) {
132 loader.item.save() 137 loader.item.save()
133 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": loader.item.accountIdentifier}); 138 Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": loader.item.accountId});
134 Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) 139 Kube.Fabric.postMessage(Kube.Messages.componentDone, {})
135 } else { 140 } else {
136 console.warn("Invalid settings."); 141 console.warn("Invalid settings.");