From 701d5d548bc3eb660d5d15264486228f77ed1986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Mon, 29 Aug 2016 17:42:19 -0300 Subject: [PATCH] refactor --- src/js/controllers/onboarding/collectEmail.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/onboarding/collectEmail.js b/src/js/controllers/onboarding/collectEmail.js index e92aa6cc9..ad9b3609e 100644 --- a/src/js/controllers/onboarding/collectEmail.js +++ b/src/js/controllers/onboarding/collectEmail.js @@ -2,8 +2,10 @@ angular.module('copayApp.controllers').controller('collectEmailController', function($scope, $state, $stateParams, profileService, walletService, platformInfo) { + var usePushNotifications = platformInfo.isCordova && !isWP; + $scope.skip = function() { - if (!platformInfo.isCordova) $state.go('onboarding.backupRequest'); + if (!usePushNotifications) $state.go('onboarding.backupRequest'); else $state.go('onboarding.notifications'); } @@ -15,7 +17,7 @@ angular.module('copayApp.controllers').controller('collectEmailController', func email: email, }, function(err) { if (err) $log.warn(err); - if (!platformInfo.isCordova) $state.go('onboarding.backupRequest'); + if (!usePushNotifications) $state.go('onboarding.backupRequest'); else $state.go('onboarding.notifications'); }); };