Remove fixmes

This commit is contained in:
Zach Fox 2017-08-11 16:21:39 -07:00
parent 9120e678f1
commit c38837c200
2 changed files with 6 additions and 14 deletions

View file

@ -35,11 +35,13 @@ Rectangle {
id: commerce;
onBuyResult: {
if (failureMessage.length) {
sendToScript({method: 'checkout_cancelClicked', params: itemId});
buyButton.text = "Buy Failed";
buyButton.enabled = false;
} else {
if (urlHandler.canHandleUrl(itemHref)) {
urlHandler.handleUrl(itemHref);
}
sendToScript({method: 'checkout_buySuccess', params: itemId});
}
}
onBalanceResult: {
@ -369,13 +371,12 @@ Rectangle {
width: parent.width/2 - anchors.leftMargin*2;
text: "Cancel"
onClicked: {
sendToScript({method: 'checkout_cancelClicked', params: itemId}); //fixme
sendToScript({method: 'checkout_cancelClicked', params: itemId});
}
}
// "Buy" button
HifiControlsUit.Button {
property bool buyFailed: false; // fixme
id: buyButton;
enabled: balanceAfterPurchase >= 0 && !alreadyOwned;
color: hifi.buttons.black;
@ -421,14 +422,9 @@ Rectangle {
itemAuthorText.text = message.params.itemAuthor;
itemPriceText.text = message.params.itemPrice;
itemHref = message.params.itemHref;
buyButton.buyFailed = false;
commerce.balance();
commerce.inventory();
break;
case 'buyFailed':
buyButton.text = "Buy Failed";
buyButton.buyFailed = true;
break;
default:
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
}

View file

@ -204,12 +204,8 @@
// I don't think this is trivial to do since we also want to inject some JS into the DOM.
//tablet.popFromStack();
break;
case 'checkout_buyClicked':
if (message.success === true) {
tablet.gotoWebScreen(MARKETPLACE_URL + '/items/' + message.itemId, MARKETPLACES_INJECT_SCRIPT_URL);
} else {
tablet.sendToQml({ method: 'buyFailed' });
}
case 'checkout_buySuccess':
tablet.gotoWebScreen(MARKETPLACE_URL + '/items/' + message.itemId, MARKETPLACES_INJECT_SCRIPT_URL);
//tablet.popFromStack();
break;
case 'inventory_itemClicked':