From 39b96c14d1eb7a9ea6091d8712464c9e664b1dc2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 29 Oct 2015 15:01:04 -0400 Subject: [PATCH] update item queries --- dashboard-ui/cordova/iap.js | 6 +++++- dashboard-ui/cordova/registrationservices.js | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dashboard-ui/cordova/iap.js b/dashboard-ui/cordova/iap.js index 285349ebdb..04c0a36ecc 100644 --- a/dashboard-ui/cordova/iap.js +++ b/dashboard-ui/cordova/iap.js @@ -140,7 +140,7 @@ if (requiresVerification) { store.when(id).verified(function (p) { - alert('verified'); + //alert('verified'); updateProductInfo(p); p.finish(); }); @@ -154,6 +154,9 @@ Logger.log('finishing previously created transaction'); if (requiresVerification) { //product.verify(); + if (product.owned) { + alert('sub owned!'); + } } else { product.finish(); } @@ -201,6 +204,7 @@ }).map(function (o) { + o.id = getStoreFeatureId(o.feature); o.buttonText = Globalize.translate(o.buttonText, getProduct(o.feature).price); return o; }); diff --git a/dashboard-ui/cordova/registrationservices.js b/dashboard-ui/cordova/registrationservices.js index 2ed77fe659..13ed4c8db5 100644 --- a/dashboard-ui/cordova/registrationservices.js +++ b/dashboard-ui/cordova/registrationservices.js @@ -257,11 +257,11 @@ function onProductUpdated(e, product) { - var deferred = currentDisplayingDeferred; + if (product.owned) { - if (deferred && product.owned) { + var deferred = currentDisplayingDeferred; - if (currentDisplayingProductInfos.filter(function (p) { + if (deferred && currentDisplayingProductInfos.filter(function (p) { return product.id == p.id;