Commit 6e2d2df4 by Sebastián Katzer

Small code style changes

parent 1baf850e
...@@ -54,7 +54,8 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION"; ...@@ -54,7 +54,8 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION";
/** /**
* Fügt eine neue Notification-Eintrag hinzu. * Fügt eine neue Notification-Eintrag hinzu.
* *
* @param {NSMutableDictionary} options Die Eigenschaften der Notification * @param {NSMutableDictionary} options
* Die Eigenschaften der Notification
*/ */
- (void) add:(CDVInvokedUrlCommand*)command - (void) add:(CDVInvokedUrlCommand*)command
{ {
...@@ -62,15 +63,17 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION"; ...@@ -62,15 +63,17 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION";
NSArray* arguments = [command arguments]; NSArray* arguments = [command arguments];
NSMutableDictionary* options = [arguments objectAtIndex:0]; NSMutableDictionary* options = [arguments objectAtIndex:0];
UILocalNotification* notification = [self notificationWithProperties:options]; UILocalNotification* notification = [self notificationWithProperties:options];
NSString* id = [notification.userInfo objectForKey:@"id"]; NSDictionary* userInfo = notification.userInfo;
NSString* json = [notification.userInfo objectForKey:@"json"]; NSString* id = [userInfo objectForKey:@"id"];
NSString* json = [userInfo objectForKey:@"json"];
[self cancelNotificationWithId:id fireEvent:NO]; [self cancelNotificationWithId:id fireEvent:NO];
[self archiveNotification:notification]; [self archiveNotification:notification];
[self fireEvent:@"add" id:id json:json]; [self fireEvent:@"add" id:id json:json];
[[UIApplication sharedApplication] scheduleLocalNotification:notification]; [[UIApplication sharedApplication]
scheduleLocalNotification:notification];
}]; }];
} }
...@@ -95,7 +98,8 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION"; ...@@ -95,7 +98,8 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION";
- (void) cancelAll:(CDVInvokedUrlCommand*)command - (void) cancelAll:(CDVInvokedUrlCommand*)command
{ {
[self.commandDelegate runInBackground:^{ [self.commandDelegate runInBackground:^{
NSDictionary* entries = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]; NSDictionary* entries = [[NSUserDefaults standardUserDefaults]
dictionaryRepresentation];
for (NSString* key in [entries allKeys]) for (NSString* key in [entries allKeys])
{ {
......
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