new version available

This commit is contained in:
Javier 2016-04-11 12:56:18 -03:00 committed by Gustavo Maximiliano Cortez
commit 5666649a2d
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
5 changed files with 104 additions and 1 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, bwcService, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, nodeWebkit, addonManager, isChromeApp, bwsError, txFormatService, uxLanguage, $state, glideraService, isMobile, addressbookService) {
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, latestReleaseService, bwcService, pushNotificationsService, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, nodeWebkit, addonManager, isChromeApp, bwsError, txFormatService, uxLanguage, $state, glideraService, isMobile, addressbookService) {
var self = this;
var SOFT_CONFIRMATION_LIMIT = 12;
var errors = bwcService.getErrors();
@ -46,6 +46,18 @@ angular.module('copayApp.controllers').controller('indexController', function($r
ret.tab = 'walletHome';
var vanillaScope = ret;
if (nodeWebkit.isDefined()) {
latestReleaseService.checkLatestRelease(function(err, newRelease) {
if (err) {
$log.warn(err);
return;
}
if (newRelease)
$scope.newRelease = gettext('There is a new version of Copay. Please update');
});
}
function strip(number) {
return (parseFloat(number.toPrecision(12)));
};