mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Mark non-extern strings static
Reviewed By: shergin Differential Revision: D5479934 fbshipit-source-id: 2dcf873f44c4847e838d0fae10ecd754d43be262
This commit is contained in:
committed by
Facebook Github Bot
parent
6555f9bee8
commit
ca9e26cecd
@@ -13,15 +13,14 @@
|
||||
#import <React/RCTEventDispatcher.h>
|
||||
#import <React/RCTUtils.h>
|
||||
|
||||
NSString *const RCTOpenURLNotification = @"RCTOpenURLNotification";
|
||||
|
||||
static NSString *const kOpenURLNotification = @"RCTOpenURLNotification";
|
||||
|
||||
static void postNotificationWithURL(NSURL *URL, id sender)
|
||||
{
|
||||
NSDictionary<NSString *, id> *payload = @{@"url": URL.absoluteString};
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RCTOpenURLNotification
|
||||
object:sender
|
||||
userInfo:payload];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kOpenURLNotification
|
||||
object:sender
|
||||
userInfo:payload];
|
||||
}
|
||||
|
||||
@implementation RCTLinkingManager
|
||||
@@ -37,7 +36,7 @@ RCT_EXPORT_MODULE()
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleOpenURLNotification:)
|
||||
name:RCTOpenURLNotification
|
||||
name:kOpenURLNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
@@ -74,7 +73,7 @@ continueUserActivity:(NSUserActivity *)userActivity
|
||||
{
|
||||
if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
|
||||
NSDictionary *payload = @{@"url": userActivity.webpageURL.absoluteString};
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RCTOpenURLNotification
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kOpenURLNotification
|
||||
object:self
|
||||
userInfo:payload];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user