cordova-plugin-apprate
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -5,2 +5,6 @@ # Changelog | ||
- Nothing yet | ||
- 1.7.1 | ||
- [PR #293](https://github.com/pushandplay/cordova-plugin-apprate/pull/293) - Fix handling of `customLocale` object in `setPreferences` | ||
- [PR #289](https://github.com/pushandplay/cordova-plugin-apprate/pull/289) - Bugfix to ensure `getAppVersion()` runs after localstorage has been initialized | ||
@@ -7,0 +11,0 @@ - 1.7.0 |
{ | ||
"name": "cordova-plugin-apprate", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -228,3 +228,3 @@ /* | ||
if (pref.hasOwnProperty(key) && prefObj.hasOwnProperty(key)) { | ||
if (typeof pref[key] === 'object') { | ||
if (typeof pref[key] === 'object' && key !== 'customLocale') { | ||
setPreferences(pref[key], prefObj[key]); | ||
@@ -240,13 +240,2 @@ } else { | ||
AppRate.init = function() { | ||
var appVersionPromise = getAppVersion() | ||
.then(function(applicationVersion) { | ||
if (counter.applicationVersion !== applicationVersion) { | ||
counter.applicationVersion = applicationVersion; | ||
if (preferences.promptAgainForEachNewVersion) { | ||
updateCounter('reset'); | ||
} | ||
} | ||
}) | ||
.catch(noop); | ||
var appTitlePromise = getAppTitle() | ||
@@ -266,8 +255,18 @@ .then(function(displayAppName) { | ||
var storagePromise = Storage.get(LOCAL_STORAGE_COUNTER).then(function(storedCounter) { | ||
counter = storedCounter || counter | ||
}); | ||
var storagePromise = Storage.get(LOCAL_STORAGE_COUNTER) | ||
.then(function(storedCounter) { | ||
counter = storedCounter || counter; | ||
return getAppVersion(); | ||
}) | ||
.then(function(applicationVersion) { | ||
if (counter.applicationVersion !== applicationVersion) { | ||
counter.applicationVersion = applicationVersion; | ||
if (preferences.promptAgainForEachNewVersion) { | ||
updateCounter('reset'); | ||
} | ||
} | ||
}) | ||
.catch(noop); | ||
var initPromise = Promise.all([ | ||
checkIsNativePromptAvailablePromise, | ||
appVersionPromise, | ||
appTitlePromise, | ||
@@ -274,0 +273,0 @@ storagePromise |
Sorry, the diff of this file is not supported yet
78742