Commit 22ec9056 by Sebastián Katzer

Replace self.center to _center

parent 96a5ed36
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
// NSNumber* id = [options objectForKey:@"id"]; // NSNumber* id = [options objectForKey:@"id"];
// UNNotificationRequest* notification; // UNNotificationRequest* notification;
// //
// notification = [self.center getNotificationWithId:id]; // notification = [_center getNotificationWithId:id];
// //
// if (!notification) // if (!notification)
// continue; // continue;
...@@ -152,12 +152,12 @@ ...@@ -152,12 +152,12 @@
for (NSNumber* id in command.arguments) { for (NSNumber* id in command.arguments) {
UNNotificationRequest* notification; UNNotificationRequest* notification;
notification = [self.center getNotificationWithId:id]; notification = [_center getNotificationWithId:id];
if (!notification) if (!notification)
continue; continue;
[self.center clearNotification:notification]; [_center clearNotification:notification];
[self fireEvent:@"clear" notification:notification]; [self fireEvent:@"clear" notification:notification];
} }
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
- (void) clearAll:(CDVInvokedUrlCommand*)command - (void) clearAll:(CDVInvokedUrlCommand*)command
{ {
[self.commandDelegate runInBackground:^{ [self.commandDelegate runInBackground:^{
[self.center clearAllNotifications]; [_center clearAllNotifications];
[self.app setApplicationIconBadgeNumber:0]; [self.app setApplicationIconBadgeNumber:0];
[self fireEvent:@"clearall"]; [self fireEvent:@"clearall"];
[self execCallback:command]; [self execCallback:command];
...@@ -193,12 +193,12 @@ ...@@ -193,12 +193,12 @@
for (NSNumber* id in command.arguments) { for (NSNumber* id in command.arguments) {
UNNotificationRequest* notification; UNNotificationRequest* notification;
notification = [self.center getNotificationWithId:id]; notification = [_center getNotificationWithId:id];
if (!notification) if (!notification)
continue; continue;
[self.center cancelNotification:notification]; [_center cancelNotification:notification];
[self fireEvent:@"cancel" notification:notification]; [self fireEvent:@"cancel" notification:notification];
} }
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
- (void) cancelAll:(CDVInvokedUrlCommand*)command - (void) cancelAll:(CDVInvokedUrlCommand*)command
{ {
[self.commandDelegate runInBackground:^{ [self.commandDelegate runInBackground:^{
[self.center cancelAllNotifications]; [_center cancelAllNotifications];
[self.app setApplicationIconBadgeNumber:0]; [self.app setApplicationIconBadgeNumber:0];
[self fireEvent:@"cancelall"]; [self fireEvent:@"cancelall"];
[self execCallback:command]; [self execCallback:command];
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
byType:(APPNotificationType)type; byType:(APPNotificationType)type;
{ {
[self.commandDelegate runInBackground:^{ [self.commandDelegate runInBackground:^{
NSArray* ids = [self.center getNotificationIdsByType:type]; NSArray* ids = [_center getNotificationIdsByType:type];
CDVPluginResult* result; CDVPluginResult* result;
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
...@@ -497,7 +497,7 @@ ...@@ -497,7 +497,7 @@
UNAuthorizationOptions options = UNAuthorizationOptions options =
(UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert); (UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert);
[self.center requestAuthorizationWithOptions:options completionHandler:^(BOOL granted, NSError* e) { [_center requestAuthorizationWithOptions:options completionHandler:^(BOOL granted, NSError* e) {
[self check:command]; [self check:command];
}]; }];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment