New push notifications

This commit is contained in:
Gustavo Maximiliano Cortez 2017-02-03 18:03:29 -03:00
commit 4e8bd0634c
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
13 changed files with 139 additions and 153 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $timeout, $stateParams, $ionicConfig, profileService, configService, $interval) {
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $timeout, $stateParams, $ionicConfig, profileService, configService, $interval, pushNotificationsService) {
$scope.$on("$ionicView.enter", function() {
$ionicConfig.views.swipeBackEnabled(false);
@ -15,7 +15,7 @@ angular.module('copayApp.controllers').controller('notificationsController', fun
$scope.allowNotif = function() {
$scope.notificationDialogOpen = true;
$timeout(function() {
profileService.pushNotificationsInit();
pushNotificationsService.init();
});
$scope.notificationPromise = $interval(function() {
PushNotification.hasPermission(function(data) {