diff options
author | Chen Liang <chliang@google.com> | 2018-02-28 10:35:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-28 10:35:25 -0800 |
commit | c6f73f7218360b364e1feb85489c58d837b575fc (patch) | |
tree | e05785ce28d1cc31bb25bfe26b03216ea3748a14 /Firebase/Messaging | |
parent | 288855b1fe275234b666c3ed18d351079985343b (diff) |
Fix the issue completion handler is not triggered in subscribeToTopic. (#867)
* fix the issue that handler not get triggered
Diffstat (limited to 'Firebase/Messaging')
-rw-r--r-- | Firebase/Messaging/FIRMessagingPendingTopicsList.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Firebase/Messaging/FIRMessagingPendingTopicsList.m b/Firebase/Messaging/FIRMessagingPendingTopicsList.m index 792090e..8bab770 100644 --- a/Firebase/Messaging/FIRMessagingPendingTopicsList.m +++ b/Firebase/Messaging/FIRMessagingPendingTopicsList.m @@ -160,9 +160,10 @@ NSString *const kPendingTopicsTimestampEncodingKey = @"ts"; if (completion) { NSMutableArray *handlers = lastBatch.topicHandlers[topic]; if (!handlers) { - handlers = [NSMutableArray arrayWithCapacity:1]; + handlers = [[NSMutableArray alloc] init]; } [handlers addObject:completion]; + lastBatch.topicHandlers[topic] = handlers; } if (!self.currentBatch) { self.currentBatch = lastBatch; |