and lets fix the purchases flow too

This commit is contained in:
David Kelly 2017-09-08 14:00:09 -07:00
parent c142215935
commit 99cdbbe306

View file

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