First round

This commit is contained in:
Zach Fox 2017-10-09 12:11:07 -07:00
parent 895f79fd80
commit acdd1e32e4
3 changed files with 12 additions and 8 deletions

View file

@ -79,6 +79,8 @@ Rectangle {
failureErrorText.text = result.message;
root.activeView = "checkoutFailure";
} else {
root.itemHref = result.data.download_url;
console.log("ZRF TEST " + root.itemHref);
root.activeView = "checkoutSuccess";
}
}
@ -125,7 +127,7 @@ Rectangle {
id: notSetUpTimer;
interval: 200;
onTriggered: {
sendToScript({method: 'checkout_walletNotSetUp'});
sendToScript({method: 'checkout_walletNotSetUp', itemId: itemId});
}
}

View file

@ -78,6 +78,10 @@ Rectangle {
onInventoryResult: {
purchasesReceived = true;
if (root.pendingInventoryReply) {
inventoryTimer.start();
}
if (result.status !== 'success') {
console.log("Failed to get purchases", result.message);
} else {
@ -98,10 +102,6 @@ Rectangle {
previousPurchasesModel.append(inventoryResult);
buildFilteredPurchasesModel();
if (root.pendingInventoryReply) {
inventoryTimer.start();
}
}
root.pendingInventoryReply = false;
@ -112,7 +112,7 @@ Rectangle {
id: notSetUpTimer;
interval: 200;
onTriggered: {
sendToScript({method: 'checkout_walletNotSetUp'});
sendToScript({method: 'purchases_walletNotSetUp'});
}
}
@ -426,7 +426,7 @@ Rectangle {
itemName: title;
itemId: id;
itemPreviewImageUrl: preview;
itemHref: root_file_url;
itemHref: download_url;
purchaseStatus: status;
purchaseStatusChanged: statusChanged;
itemEdition: model.edition_number;

View file

@ -176,6 +176,8 @@ Rectangle {
commerce.getWalletStatus();
} else if (msg.referrer === 'purchases') {
sendToScript({method: 'goToPurchases'});
} else {
sendToScript({method: 'goToMarketplaceItemPage', itemId: msg.referrer});
}
} else if (msg.method === 'walletSetup_raiseKeyboard') {
root.keyboardRaised = true;
@ -283,7 +285,7 @@ Rectangle {
Connections {
onSendSignalToParent: {
if (msg.method === "authSuccess") {
root.activeView = "walletHome";
commerce.getWalletStatus();
} else {
sendToScript(msg);
}