Fixed get changelog

This commit is contained in:
Igor Zhukov 2017-06-30 23:10:39 +03:00
parent cddccdfba3
commit 1c9e6fe42a

View File

@ -4350,17 +4350,21 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
$timeout(function () { $timeout(function () {
Storage.get('last_version').then(function (lastVersion) { Storage.get('last_version').then(function (lastVersion) {
if (lastVersion != Config.App.version) { if (lastVersion != Config.App.version) {
MtpApiManager.invokeApi('help.getAppChangelog', { if (!lastVersion) {
prev_app_version: lastVersion
}, {
noErrorBox: true,
}).then(function (updates) {
if (updates._ == 'updates' && !updates.updates.length) {
return false
}
ApiUpdatesManager.processUpdateMessage(updates)
Storage.set({last_version: Config.App.version}) Storage.set({last_version: Config.App.version})
}) } else {
MtpApiManager.invokeApi('help.getAppChangelog', {
prev_app_version: lastVersion
}, {
noErrorBox: true,
}).then(function (updates) {
if (updates._ == 'updates' && !updates.updates.length) {
return false
}
ApiUpdatesManager.processUpdateMessage(updates)
Storage.set({last_version: Config.App.version})
})
}
} }
}) })
}, 5000) }, 5000)