move push notifications config to configService
This commit is contained in:
parent
a97befc20a
commit
50ffb0af23
3 changed files with 25 additions and 23 deletions
|
|
@ -36,12 +36,12 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
|
|||
var unwatchNotification = $scope.$watch('notifications', function(newVal, oldVal) {
|
||||
if (newVal == oldVal) return;
|
||||
var opts = {
|
||||
notifications: {
|
||||
pushNotifications: {
|
||||
enabled: newVal
|
||||
}
|
||||
};
|
||||
configService.set(opts, function(err) {
|
||||
if (opts.notifications.enabled)
|
||||
if (opts.pushNotifications.enabled)
|
||||
pushNotificationsService.enableNotifications();
|
||||
else
|
||||
pushNotificationsService.disableNotifications();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue