[ios] Added sharing logs.

This commit is contained in:
Timur Bernikowich 2014-11-27 12:49:00 +03:00 committed by Alex Zolotarev
parent 8904031842
commit 03a3fcc149

View file

@ -75,7 +75,10 @@ typedef void (^CompletionHandler)(UIBackgroundFetchResult);
notificationTitle = L(notificationInfo[@"NotificationLocalizedBodyKey"]);
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:notificationTitle message:nil delegate:nil cancelButtonTitle:dismissiveAction otherButtonTitles:positiveAction, nil];
alertView.tapBlock = ^(UIAlertView *alertView, NSInteger buttonIndex) {
if (buttonIndex != alertView.cancelButtonIndex)
NSString * notificationID = notificationInfo[@"NotificationID"];
BOOL shared = (buttonIndex != alertView.cancelButtonIndex);
[[Statistics instance] logEvent:[NSString stringWithFormat:@"'%@' Notification Show", notificationID] withParameters:@{@"Shared" : @(shared)}];
if (shared)
[self runNotificationAction:notificationInfo];
};
[alertView show];