only check for new version on first include
This commit is contained in:
parent
3b16eaabe7
commit
0962271633
1 changed files with 24 additions and 19 deletions
|
|
@ -7,7 +7,11 @@ angular.module('copayApp.controllers').controller('VersionController',
|
||||||
$scope.commitHash = copay.commitHash;
|
$scope.commitHash = copay.commitHash;
|
||||||
$scope.networkName = config.networkName;
|
$scope.networkName = config.networkName;
|
||||||
$scope.defaultLanguage = config.defaultLanguage;
|
$scope.defaultLanguage = config.defaultLanguage;
|
||||||
|
if (_.isUndefined($rootScope.checkVersion))
|
||||||
|
$rootScope.checkVersion = true;
|
||||||
|
|
||||||
|
if ($rootScope.checkVersion) {
|
||||||
|
$rootScope.checkVersion = false;
|
||||||
$http.get('https://api.github.com/repos/bitpay/copay/tags').success(function(data) {
|
$http.get('https://api.github.com/repos/bitpay/copay/tags').success(function(data) {
|
||||||
var toInt = function(s) {
|
var toInt = function(s) {
|
||||||
return parseInt(s);
|
return parseInt(s);
|
||||||
|
|
@ -24,5 +28,6 @@ angular.module('copayApp.controllers').controller('VersionController',
|
||||||
notification.version(title, content, false);
|
notification.version(title, content, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue