Commit 766ec4ce by Sebastián Katzer

Fire clear event also

parent 7648e407
...@@ -582,6 +582,8 @@ ...@@ -582,6 +582,8 @@
UNNotificationRequest* notification = response.notification.request; UNNotificationRequest* notification = response.notification.request;
NSString* action = response.actionIdentifier; NSString* action = response.actionIdentifier;
NSString* event = action; NSString* event = action;
completionHandler();
if ([action isEqualToString:UNNotificationDefaultActionIdentifier]) { if ([action isEqualToString:UNNotificationDefaultActionIdentifier]) {
event = @"click"; event = @"click";
...@@ -589,10 +591,12 @@ ...@@ -589,10 +591,12 @@
if ([action isEqualToString:UNNotificationDismissActionIdentifier]) { if ([action isEqualToString:UNNotificationDismissActionIdentifier]) {
event = @"clear"; event = @"clear";
} }
if (![event isEqualToString:@"clear"]) {
[self fireEvent:@"clear" notification:notification];
}
[self fireEvent:event notification:notification]; [self fireEvent:event notification:notification];
completionHandler();
} }
#pragma mark - #pragma mark -
......
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