mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 16:30:10 +02:00
Remove fixmes
This commit is contained in:
parent
9120e678f1
commit
c38837c200
2 changed files with 6 additions and 14 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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':
|
||||
|
|
Loading…
Reference in a new issue