Skip to content

Commit

Permalink
Extracting dictionary literal userInfo parameter into intermediary va…
Browse files Browse the repository at this point in the history
…riable
  • Loading branch information
mattt committed Mar 15, 2015
1 parent 99894d4 commit dccc98d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions AFNetworking/AFNetworkReachabilityManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused targ

dispatch_async(dispatch_get_main_queue(), ^{
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
[notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:@{ AFNetworkingReachabilityNotificationStatusItem: @(status) }];
NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) };
[notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo];
});

}
Expand Down Expand Up @@ -201,7 +202,8 @@ - (void)startMonitoring {
callback(status);

NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
[notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:@{ AFNetworkingReachabilityNotificationStatusItem: @(status) }];
NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) };
[notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo];
});
});
}
Expand Down

0 comments on commit dccc98d

Please sign in to comment.