Fix animation after send feedback (back). Adds Share BitPay option in settings

This commit is contained in:
Gustavo Maximiliano Cortez 2016-11-16 16:57:36 -03:00
commit 96e6fc5345
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
5 changed files with 27 additions and 12 deletions

View file

@ -1,8 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('completeController', function($scope, $stateParams, $timeout, $log, $ionicHistory, $state, platformInfo, configService, storageService, lodash) {
$scope.score = parseInt($stateParams.score);
$scope.skipped = $stateParams.skipped == 'false' ? false : true;
$scope.isCordova = platformInfo.isCordova;
var config = configService.getSync();
@ -32,6 +30,9 @@ angular.module('copayApp.controllers').controller('completeController', function
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null;
$scope.skipped = (data.stateParams && data.stateParams.skipped) ? true : false;
storageService.getFeedbackInfo(function(error, info) {
var feedbackInfo = lodash.isString(info) ? JSON.parse(info) : null;
feedbackInfo.sent = true;
@ -92,13 +93,10 @@ angular.module('copayApp.controllers').controller('completeController', function
});
$scope.close = function() {
$ionicHistory.clearHistory();
$ionicHistory.nextViewOptions({
disableAnimate: true,
disableAnimate: false,
historyRoot: true
});
$timeout(function() {
$state.go('tabs.home');
}, 100);
$ionicHistory.goBack(-2);
};
});