adding Copay feedback flow
This commit is contained in:
parent
aeea866623
commit
57ea60d8a6
8 changed files with 44 additions and 14 deletions
|
|
@ -1,7 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('rateAppController', function($scope, $state, $stateParams, $window, 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, appConfigService) {
|
||||
$scope.score = parseInt($stateParams.score);
|
||||
$scope.appName = appConfigService.nameCase;
|
||||
var isAndroid = platformInfo.isAndroid;
|
||||
var isIOS = platformInfo.isIOS;
|
||||
var isWP = platformInfo.isWP;
|
||||
|
|
@ -37,9 +38,24 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
|
|||
$scope.goAppStore = function() {
|
||||
var defaults = configService.getDefaults();
|
||||
var url;
|
||||
if (isAndroid) url = defaults.rateApp.android;
|
||||
if (isIOS) url = defaults.rateApp.ios;
|
||||
// if (isWP) url = defaults.rateApp.windows; // TODO
|
||||
if (isAndroid) {
|
||||
if ($scope.appName == 'Copay')
|
||||
url = defaults.rateCopay.android;
|
||||
if ($scope.appName == 'BitPay')
|
||||
url = defaults.rateBitPay.android;
|
||||
}
|
||||
if (isIOS) {
|
||||
if ($scope.appName == 'Copay')
|
||||
url = defaults.rateCopay.ios;
|
||||
if ($scope.appName == 'BitPay')
|
||||
url = defaults.rateBitPay.ios;
|
||||
}
|
||||
// if (isWP) {
|
||||
// if ($scope.appName == 'Copay')
|
||||
// url = defaults.rateCopay.windows;
|
||||
// if ($scope.appName == 'BitPay')
|
||||
// url = defaults.rateBitPay.windows;
|
||||
// }
|
||||
externalLinkService.open(url);
|
||||
$state.go('tabs.rate.complete', {
|
||||
score: $stateParams.score,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue