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';
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);
var isAndroid = platformInfo.isAndroid;
var isIOS = platformInfo.isIOS;
@ -12,7 +12,7 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
"Email": lodash.values(config.emailFor)[0] || ' ',
"Feedback": ' ',
"Score": $stateParams.score,
"AppVersion": appConfigService.version,
"AppVersion": $window.version,
"Platform": ionic.Platform.platform(),
"DeviceVersion": ionic.Platform.version()
};

View file

@ -1,6 +1,6 @@
'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) {
@ -10,7 +10,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
"Email": lodash.values(config.emailFor)[0] || ' ',
"Feedback": goHome ? ' ' : feedback,
"Score": $stateParams.score || ' ',
"AppVersion": appConfigService.version,
"AppVersion": $window.version,
"Platform": ionic.Platform.platform(),
"DeviceVersion": ionic.Platform.version()
};

View file

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

View file

@ -1,14 +1,13 @@
'use strict';
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) {
console.log(appConfigService.version);
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) {
var wallet;
var listeners = [];
var notifications = [];
$scope.externalServices = {};
$scope.openTxpModal = txpModalService.open;
$scope.version = appConfigService;
$scope.version = $window.version;
$scope.name = appConfigService.nameCase;
$scope.homeTip = $stateParams.fromOnboarding;
$scope.isCordova = platformInfo.isCordova;
@ -44,7 +43,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
} else {
var feedbackInfo = JSON.parse(info);
//Check if current version is greater than saved version
var currentVersion = window.version;
var currentVersion = $scope.version;
var savedVersion = feedbackInfo.version;
var isVersionUpdated = feedbackService.isVersionUpdated(currentVersion, savedVersion);
if (!isVersionUpdated) {
@ -63,7 +62,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
function initFeedBackInfo() {
var feedbackInfo = {};
feedbackInfo.time = moment().unix();
feedbackInfo.version = window.version;
feedbackInfo.version = $scope.version;
feedbackInfo.sent = false;
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
$scope.showRateCard.value = false;