only check for new version on first include

This commit is contained in:
Ivan Socolsky 2014-09-10 15:39:36 -03:00
commit 0962271633

View file

@ -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);
} }
}); });
}
}); });