adding send feedback option in settings

This commit is contained in:
Gabriel Bazán 2016-11-08 11:49:03 -03:00
commit 80888f63a1
14 changed files with 132 additions and 102 deletions

View file

@ -13,6 +13,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.isCordova = platformInfo.isCordova;
$scope.isAndroid = platformInfo.isAndroid;
$scope.isNW = platformInfo.isNW;
$scope.hideRateCard = {};
$scope.$on("$ionicView.afterEnter", function() {
startupService.ready();
@ -37,7 +38,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
}
storageService.getRateCardFlag(function(error, value) {
$scope.hideRateCard = (value == 'true') ? true : false;
$scope.hideRateCard.value = (value == 'true') ? true : false;
});
});
@ -108,51 +109,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
externalLinkService.open(url, optIn, title, message, okText, cancelText);
};
$scope.hideCard = function() {
storageService.setRateCardFlag('true', function() {
$scope.hideRateCard = true;
$timeout(function() {
$scope.$apply();
})
});
}
$scope.setScore = function(score) {
$scope.score = score;
switch ($scope.score) {
case 1:
$scope.button_title = gettextCatalog.getString("I think this app is terrible");
break;
case 2:
$scope.button_title = gettextCatalog.getString("I don't like it");
break;
case 3:
$scope.button_title = gettextCatalog.getString("Meh - it's alright");
break;
case 4:
$scope.button_title = gettextCatalog.getString("I like the app");
break;
case 5:
$scope.button_title = gettextCatalog.getString("This app is fantastic");
break;
}
$timeout(function() {
$scope.$apply();
});
};
$scope.goFeedbackFlow = function() {
if ($scope.isCordova && $scope.score == 5) {
$state.go('feedback.rateAppStore', {
score: $scope.score
});
} else {
$state.go('feedback.sendFeedback', {
score: $scope.score
});
}
};
$scope.openNotificationModal = function(n) {
wallet = profileService.getWallet(n.walletId);