Fix feedback issues
This commit is contained in:
parent
1943f2afa6
commit
e7bb449b6e
11 changed files with 98 additions and 93 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) {
|
||||
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) {
|
||||
|
||||
$scope.sendFeedback = function(feedback, skip) {
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
|||
});
|
||||
return;
|
||||
}
|
||||
$state.go('feedback.complete', {
|
||||
$state.go('tabs.rate.complete', {
|
||||
score: $stateParams.score,
|
||||
skipped: skip
|
||||
});
|
||||
|
|
@ -41,9 +41,15 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
|||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.score = parseInt($stateParams.score);
|
||||
$scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null;
|
||||
$scope.feedback = {};
|
||||
|
||||
if ($scope.score) {
|
||||
$ionicNavBarDelegate.showBackButton(false);
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
}
|
||||
else $ionicNavBarDelegate.showBackButton(true);
|
||||
|
||||
switch ($scope.score) {
|
||||
case 1:
|
||||
$scope.reaction = gettextCatalog.getString("Ouch!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue