remove events and refactor of push notifications functions
This commit is contained in:
parent
509047e2b0
commit
e19ece08c7
4 changed files with 25 additions and 35 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesGlobalController',
|
||||
function($scope, $rootScope, $log, configService, uxLanguage, pushNotificationsService) {
|
||||
function($scope, $rootScope, $log, configService, uxLanguage, pushNotificationsService, profileService) {
|
||||
|
||||
this.init = function() {
|
||||
var config = configService.getSync();
|
||||
|
|
@ -39,9 +39,9 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
|
|||
};
|
||||
configService.set(opts, function(err) {
|
||||
if (opts.pushNotifications.enabled)
|
||||
pushNotificationsService.enableNotifications();
|
||||
pushNotificationsService.enableNotifications(profileService.walletClients);
|
||||
else
|
||||
pushNotificationsService.disableNotifications();
|
||||
pushNotificationsService.disableNotifications(profileService.walletClients);
|
||||
if (err) $log.debug(err);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue