Commit ef16347a by Sebastián Katzer

Shorten some var names to be more readable

parent cbfe67ca
......@@ -38,6 +38,11 @@
@implementation APPLocalNotification
UNNotificationPresentationOptions const OptionNone = UNNotificationPresentationOptionNone;
UNNotificationPresentationOptions const OptionBadge = UNNotificationPresentationOptionBadge;
UNNotificationPresentationOptions const OptionSound = UNNotificationPresentationOptionSound;
UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentationOptionAlert;
@synthesize deviceready, isActive, eventQueue;
#pragma mark -
......@@ -503,13 +508,13 @@
*/
- (void) userNotificationCenter:(UNUserNotificationCenter *)center
willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler
withCompletionHandler:(void (^)(UNNotificationPresentationOptions))handler
{
UNNotificationRequest* toast = notification.request;
[_delegate userNotificationCenter:center
willPresentNotification:notification
withCompletionHandler:completionHandler];
withCompletionHandler:handler];
if ([toast.trigger isKindOfClass:UNPushNotificationTrigger.class])
return;
......@@ -521,11 +526,11 @@
}
if (options.silent) {
completionHandler(UNNotificationPresentationOptionNone);
handler(OptionNone);
} else if (!isActive || options.priority > 0) {
completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert);
handler(OptionBadge|OptionSound|OptionAlert);
} else {
completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound);
handler(OptionBadge|OptionSound);
}
}
......@@ -535,15 +540,15 @@
*/
- (void) userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
withCompletionHandler:(void (^)(void))completionHandler
withCompletionHandler:(void (^)(void))handler
{
UNNotificationRequest* toast = response.notification.request;
[_delegate userNotificationCenter:center
didReceiveNotificationResponse:response
withCompletionHandler:completionHandler];
withCompletionHandler:handler];
completionHandler();
handler();
if ([toast.trigger isKindOfClass:UNPushNotificationTrigger.class])
return;
......
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