|
|
@ -4343,21 +4343,28 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
|
|
|
|
|
|
|
|
.service('ChangelogNotifyService', function (Storage, $rootScope, $modal, $timeout, MtpApiManager, ApiUpdatesManager) { |
|
|
|
.service('ChangelogNotifyService', function (Storage, $rootScope, $modal, $timeout, MtpApiManager, ApiUpdatesManager) { |
|
|
|
function checkUpdate () { |
|
|
|
function checkUpdate () { |
|
|
|
$timeout(function () { |
|
|
|
MtpApiManager.getUserID().then(function (userID) { |
|
|
|
Storage.get('last_version').then(function (lastVersion) { |
|
|
|
if (!userID) { |
|
|
|
if (lastVersion != Config.App.version) { |
|
|
|
return |
|
|
|
MtpApiManager.invokeApi('help.getAppChangelog', { |
|
|
|
} |
|
|
|
prev_app_version: lastVersion |
|
|
|
$timeout(function () { |
|
|
|
}).then(function (updates) { |
|
|
|
Storage.get('last_version').then(function (lastVersion) { |
|
|
|
if (updates._ == 'updates' && !updates.updates.length) { |
|
|
|
if (lastVersion != Config.App.version) { |
|
|
|
return false |
|
|
|
MtpApiManager.invokeApi('help.getAppChangelog', { |
|
|
|
} |
|
|
|
prev_app_version: lastVersion |
|
|
|
ApiUpdatesManager.processUpdateMessage(updates) |
|
|
|
}, { |
|
|
|
Storage.set({last_version: Config.App.version}) |
|
|
|
noErrorBox: true, |
|
|
|
}) |
|
|
|
}).then(function (updates) { |
|
|
|
} |
|
|
|
if (updates._ == 'updates' && !updates.updates.length) { |
|
|
|
}) |
|
|
|
return false |
|
|
|
}, 5000) |
|
|
|
} |
|
|
|
|
|
|
|
ApiUpdatesManager.processUpdateMessage(updates) |
|
|
|
|
|
|
|
Storage.set({last_version: Config.App.version}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, 5000) |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function showChangelog (lastVersion) { |
|
|
|
function showChangelog (lastVersion) { |
|
|
|