fix push notifications and remove onboarding email
This commit is contained in:
parent
2370fc97ad
commit
3320510d35
9 changed files with 74 additions and 53 deletions
|
|
@ -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
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue