fix version value

This commit is contained in:
Javier 2016-12-27 17:05:02 -03:00
commit 4a79ecbfb3
4 changed files with 9 additions and 10 deletions

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('rateAppController', function($scope, $state, $stateParams, appConfigService, lodash, externalLinkService, configService, platformInfo, feedbackService, ongoingProcess, popupService) { angular.module('copayApp.controllers').controller('rateAppController', function($scope, $state, $stateParams, $window, lodash, externalLinkService, configService, platformInfo, feedbackService, ongoingProcess, popupService) {
$scope.score = parseInt($stateParams.score); $scope.score = parseInt($stateParams.score);
var isAndroid = platformInfo.isAndroid; var isAndroid = platformInfo.isAndroid;
var isIOS = platformInfo.isIOS; var isIOS = platformInfo.isIOS;
@ -12,7 +12,7 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
"Email": lodash.values(config.emailFor)[0] || ' ', "Email": lodash.values(config.emailFor)[0] || ' ',
"Feedback": ' ', "Feedback": ' ',
"Score": $stateParams.score, "Score": $stateParams.score,
"AppVersion": appConfigService.version, "AppVersion": $window.version,
"Platform": ionic.Platform.platform(), "Platform": ionic.Platform.platform(),
"DeviceVersion": ionic.Platform.version() "DeviceVersion": ionic.Platform.version()
}; };

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, appConfigService, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess, platformInfo) { angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess, platformInfo) {
$scope.sendFeedback = function(feedback, goHome) { $scope.sendFeedback = function(feedback, goHome) {
@ -10,7 +10,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
"Email": lodash.values(config.emailFor)[0] || ' ', "Email": lodash.values(config.emailFor)[0] || ' ',
"Feedback": goHome ? ' ' : feedback, "Feedback": goHome ? ' ' : feedback,
"Score": $stateParams.score || ' ', "Score": $stateParams.score || ' ',
"AppVersion": appConfigService.version, "AppVersion": $window.version,
"Platform": ionic.Platform.platform(), "Platform": ionic.Platform.platform(),
"DeviceVersion": ionic.Platform.version() "DeviceVersion": ionic.Platform.version()
}; };

View file

@ -4,7 +4,7 @@ angular.module('copayApp.controllers').controller('preferencesAbout',
function($scope, $window, appConfigService, gettextCatalog, externalLinkService) { function($scope, $window, appConfigService, gettextCatalog, externalLinkService) {
$scope.title = gettextCatalog.getString('About') + ' ' + appConfigService.nameCase; $scope.title = gettextCatalog.getString('About') + ' ' + appConfigService.nameCase;
$scope.version = appConfigService.version; $scope.version = $window.version;
$scope.commitHash = $window.commitHash; $scope.commitHash = $window.commitHash;
$scope.openExternalLink = function() { $scope.openExternalLink = function() {

View file

@ -1,14 +1,13 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('tabHomeController', angular.module('copayApp.controllers').controller('tabHomeController',
function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, gettextCatalog, lodash, popupService, ongoingProcess, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, appConfigService, bitpayCardService, startupService, addressbookService, feedbackService) { function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, appConfigService, bitpayCardService, startupService, addressbookService, feedbackService) {
console.log(appConfigService.version);
var wallet; var wallet;
var listeners = []; var listeners = [];
var notifications = []; var notifications = [];
$scope.externalServices = {}; $scope.externalServices = {};
$scope.openTxpModal = txpModalService.open; $scope.openTxpModal = txpModalService.open;
$scope.version = appConfigService; $scope.version = $window.version;
$scope.name = appConfigService.nameCase; $scope.name = appConfigService.nameCase;
$scope.homeTip = $stateParams.fromOnboarding; $scope.homeTip = $stateParams.fromOnboarding;
$scope.isCordova = platformInfo.isCordova; $scope.isCordova = platformInfo.isCordova;
@ -44,7 +43,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
} else { } else {
var feedbackInfo = JSON.parse(info); var feedbackInfo = JSON.parse(info);
//Check if current version is greater than saved version //Check if current version is greater than saved version
var currentVersion = window.version; var currentVersion = $scope.version;
var savedVersion = feedbackInfo.version; var savedVersion = feedbackInfo.version;
var isVersionUpdated = feedbackService.isVersionUpdated(currentVersion, savedVersion); var isVersionUpdated = feedbackService.isVersionUpdated(currentVersion, savedVersion);
if (!isVersionUpdated) { if (!isVersionUpdated) {
@ -63,7 +62,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
function initFeedBackInfo() { function initFeedBackInfo() {
var feedbackInfo = {}; var feedbackInfo = {};
feedbackInfo.time = moment().unix(); feedbackInfo.time = moment().unix();
feedbackInfo.version = window.version; feedbackInfo.version = $scope.version;
feedbackInfo.sent = false; feedbackInfo.sent = false;
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() { storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
$scope.showRateCard.value = false; $scope.showRateCard.value = false;