Namespaced reachability notification constant

Fixes #1717.
This commit is contained in:
Minh Nguyễn
2015-06-12 11:54:46 -07:00
parent 7dc880080e
commit 4176d21d1c
3 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,7 @@
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
#endif
extern NSString *const kReachabilityChangedNotification;
extern NSString *const kMGLReachabilityChangedNotification;
typedef NS_ENUM(NSInteger, NetworkStatus) {
// Apple NetworkStatus Compatible Names.

View File

@@ -35,7 +35,7 @@
#import <netdb.h>
NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotification";
NSString *const kMGLReachabilityChangedNotification = @"kMGLReachabilityChangedNotification";
@interface MGLReachability ()
@@ -452,7 +452,7 @@ static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRea
// this makes sure the change notification happens on the MAIN THREAD
dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:kReachabilityChangedNotification
[[NSNotificationCenter defaultCenter] postNotificationName:kMGLReachabilityChangedNotification
object:self];
});
}

View File

@@ -256,7 +256,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
// Notify map object when network reachability status changes.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reachabilityChanged:)
name:kReachabilityChangedNotification
name:kMGLReachabilityChangedNotification
object:nil];
MGLReachability* reachability = [MGLReachability reachabilityForInternetConnection];