New push notifications
This commit is contained in:
parent
aeea866623
commit
4e8bd0634c
13 changed files with 139 additions and 153 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('collectEmailController', function($scope, $state, $timeout, $stateParams, $ionicConfig, profileService, configService, walletService, platformInfo) {
|
||||
angular.module('copayApp.controllers').controller('collectEmailController', function($scope, $state, $timeout, $stateParams, $ionicConfig, profileService, configService, walletService, platformInfo, pushNotificationsService) {
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function() {
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
|
|
@ -46,7 +46,7 @@ angular.module('copayApp.controllers').controller('collectEmailController', func
|
|||
walletId: walletId
|
||||
});
|
||||
} else {
|
||||
profileService.pushNotificationsInit();
|
||||
pushNotificationsService.init();
|
||||
$state.go('onboarding.backupRequest', {
|
||||
walletId: walletId
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue