소스 검색

Replace self.center to _center

Sebastián Katzer 8 년 전
부모
커밋
22ec9056bb
1개의 변경된 파일20개의 추가작업 그리고 20개의 파일을 삭제
  1. 20 20
      src/ios/APPLocalNotification.m

+ 20 - 20
src/ios/APPLocalNotification.m

@@ -100,7 +100,7 @@
 //                NSNumber* id = [options objectForKey:@"id"];
 //                UNNotificationRequest* notification;
 //
-//                notification = [self.center getNotificationWithId:id];
+//                notification = [_center getNotificationWithId:id];
 //
 //                if (!notification)
 //                    continue;
@@ -151,16 +151,16 @@
     [self.commandDelegate runInBackground:^{
         for (NSNumber* id in command.arguments) {
             UNNotificationRequest* notification;
-            
-            notification = [self.center getNotificationWithId:id];
-            
+
+            notification = [_center getNotificationWithId:id];
+
             if (!notification)
                 continue;
-            
-            [self.center clearNotification:notification];
+
+            [_center clearNotification:notification];
             [self fireEvent:@"clear" notification:notification];
         }
-        
+
         [self execCallback:command];
     }];
 }
@@ -173,7 +173,7 @@
 - (void) clearAll:(CDVInvokedUrlCommand*)command
 {
     [self.commandDelegate runInBackground:^{
-        [self.center clearAllNotifications];
+        [_center clearAllNotifications];
         [self.app setApplicationIconBadgeNumber:0];
         [self fireEvent:@"clearall"];
         [self execCallback:command];
@@ -192,13 +192,13 @@
     [self.commandDelegate runInBackground:^{
         for (NSNumber* id in command.arguments) {
             UNNotificationRequest* notification;
-            
-            notification = [self.center getNotificationWithId:id];
-            
+
+            notification = [_center getNotificationWithId:id];
+
             if (!notification)
                 continue;
-            
-            [self.center cancelNotification:notification];
+
+            [_center cancelNotification:notification];
             [self fireEvent:@"cancel" notification:notification];
         }
 
@@ -214,7 +214,7 @@
 - (void) cancelAll:(CDVInvokedUrlCommand*)command
 {
     [self.commandDelegate runInBackground:^{
-        [self.center cancelAllNotifications];
+        [_center cancelAllNotifications];
         [self.app setApplicationIconBadgeNumber:0];
         [self fireEvent:@"cancelall"];
         [self execCallback:command];
@@ -321,12 +321,12 @@
       byType:(APPNotificationType)type;
 {
     [self.commandDelegate runInBackground:^{
-        NSArray* ids = [self.center getNotificationIdsByType:type];
-        
+        NSArray* ids = [_center getNotificationIdsByType:type];
+
         CDVPluginResult* result;
         result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
                                     messageAsArray:ids];
-        
+
         [self.commandDelegate sendPluginResult:result
                                     callbackId:command.callbackId];
     }];
@@ -383,11 +383,11 @@
 
         NSArray* notifications;
         notifications = [_center getNotificationOptionsByType:type andId:ids];
-        
+
         CDVPluginResult* result;
         result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
                                messageAsDictionary:[notifications firstObject]];
-        
+
         [self.commandDelegate sendPluginResult:result
                                     callbackId:command.callbackId];
     }];
@@ -497,7 +497,7 @@
     UNAuthorizationOptions options =
     (UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert);
 
-    [self.center requestAuthorizationWithOptions:options completionHandler:^(BOOL granted, NSError* e) {
+    [_center requestAuthorizationWithOptions:options completionHandler:^(BOOL granted, NSError* e) {
         [self check:command];
     }];
 }