diff --git a/ios/IntercomEventEmitter.h b/ios/IntercomEventEmitter.h index 18171dea..799eb039 100644 --- a/ios/IntercomEventEmitter.h +++ b/ios/IntercomEventEmitter.h @@ -1,4 +1,5 @@ #import @interface IntercomEventEmitter : RCTEventEmitter +- (void)handleUpdateUnreadCount; @end diff --git a/ios/IntercomEventEmitter.m b/ios/IntercomEventEmitter.m index 9b3fdd03..ae7b9ca5 100644 --- a/ios/IntercomEventEmitter.m +++ b/ios/IntercomEventEmitter.m @@ -26,8 +26,7 @@ + (BOOL)requiresMainQueueSetup { ]; } - -- (void)handleUpdateUnreadCount:(NSNotification *)notification { +- (void)handleUpdateUnreadCount { NSUInteger unreadCount = [Intercom unreadConversationCount]; NSNumber *unreadCountNumber = @(unreadCount); [self sendEventWithName:IntercomUnreadConversationCountDidChangeNotification body:@{@"count": unreadCountNumber}];