This commit is contained in:
David Kelly 2017-09-08 16:58:12 -07:00
parent 0a3958f743
commit 1903f65e45

View file

@ -40,12 +40,20 @@ Rectangle {
Hifi.QmlCommerce { Hifi.QmlCommerce {
id: commerce; id: commerce;
onAccountResult: {
if (result.status === "success") {
commerce.getKeyFilePathIfExists();
} else {
// unsure how to handle a failure here. We definitely cannot proceed.
}
}
onLoginStatusResult: { onLoginStatusResult: {
if (!isLoggedIn && root.activeView !== "needsLogIn") { if (!isLoggedIn && root.activeView !== "needsLogIn") {
root.activeView = "needsLogIn"; root.activeView = "needsLogIn";
} else if (isLoggedIn) { } else if (isLoggedIn) {
root.activeView = "initialize"; root.activeView = "initialize";
commerce.getKeyFilePathIfExists(); commerce.account();
} }
} }