update select server

This commit is contained in:
Luke Pulverenti 2015-08-29 20:40:52 -04:00
parent 3165df56e2
commit f0f5c26a2c
9 changed files with 119 additions and 154 deletions

View file

@ -49,11 +49,19 @@
return ConnectionManager.getRegistrationInfo(feature, ApiClient);
}
var validatedFeatures = [];
function validateFeature(id, deferred) {
if (validatedFeatures.indexOf(id) != -1) {
deferred.resolve();
return;
}
var info = IapManager.getProductInfo(id) || {};
if (info.owned) {
validatedFeatures.push(id);
deferred.resolve();
return;
}
@ -71,6 +79,7 @@
getRegistrationInfo(prefix + 'appunlock', productInfo.enableSupporterUnlock).done(function (registrationInfo) {
if (registrationInfo.IsRegistered) {
validatedFeatures.push(id);
deferred.resolve();
return;
}