Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Namespace Reachability notification constant #1718

Merged
merged 1 commit into from
Jun 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/mbgl/platform/darwin/reachability.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions platform/darwin/reachability.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
#import <netdb.h>


NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotification";
NSString *const kMGLReachabilityChangedNotification = @"kMGLReachabilityChangedNotification";


@interface MGLReachability ()
Expand Down Expand Up @@ -452,7 +452,7 @@ -(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags

// 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];
});
}
Expand Down
2 changes: 1 addition & 1 deletion platform/ios/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ - (void)commonInit
// 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];
Expand Down