fix push notifications and remove onboarding email

This commit is contained in:
Gabriel Bazán 2016-10-08 20:19:55 -03:00
commit 3320510d35
9 changed files with 74 additions and 53 deletions

View file

@ -1,13 +1,32 @@
'use strict';
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $stateParams, profileService) {
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $timeout, $stateParams, profileService, configService) {
$scope.$on("$ionicView.enter", function(event, data) {
$scope.walletId = data.stateParams.walletId;
});
$scope.walletId = $stateParams.walletId;
$scope.allowNotif = function() {
profileService.pushNotificationsInit();
$timeout(function() {
profileService.pushNotificationsInit();
});
$state.go('onboarding.backupRequest', {
walletId: $scope.walletId
});
}
$scope.disableNotif = function() {
var opts = {
pushNotifications: {
enabled: false
}
};
configService.set(opts, function(err) {
if (err) $log.warn(err);
$state.go('onboarding.backupRequest', {
walletId: $scope.walletId
});
});
};
});