mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
decouple RCTDevLoadingView from RCTBundleManager
Summary: Changelog: [Internal] not used, remove Reviewed By: cipolleschi Differential Revision: D45756364 fbshipit-source-id: e825efba6adc45b3ff3b39d2e9c5a8fd95eec4a1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2acd5c0329
commit
2599cc6b1f
@@ -35,8 +35,6 @@ using namespace facebook::react;
|
||||
dispatch_block_t _initialMessageBlock;
|
||||
}
|
||||
|
||||
@synthesize bundleManager = _bundleManager;
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
- (instancetype)init
|
||||
@@ -85,25 +83,6 @@ RCT_EXPORT_MODULE()
|
||||
dispatch_time(DISPATCH_TIME_NOW, 0.2 * NSEC_PER_SEC), dispatch_get_main_queue(), self->_initialMessageBlock);
|
||||
}
|
||||
|
||||
- (UIColor *)dimColor:(UIColor *)c
|
||||
{
|
||||
// Given a color, return a slightly lighter or darker color for dim effect.
|
||||
CGFloat h, s, b, a;
|
||||
if ([c getHue:&h saturation:&s brightness:&b alpha:&a])
|
||||
return [UIColor colorWithHue:h saturation:s brightness:b < 0.5 ? b * 1.25 : b * 0.75 alpha:a];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *)getTextForHost
|
||||
{
|
||||
NSURL *bundleURL = _bundleManager.bundleURL;
|
||||
if (bundleURL == nil || bundleURL.fileURL) {
|
||||
return @"React Native";
|
||||
}
|
||||
|
||||
return [NSString stringWithFormat:@"%@:%@", bundleURL.host, bundleURL.port];
|
||||
}
|
||||
|
||||
- (void)showMessage:(NSString *)message color:(UIColor *)color backgroundColor:(UIColor *)backgroundColor
|
||||
{
|
||||
if (!RCTDevLoadingViewGetEnabled() || self->_hiding) {
|
||||
|
||||
Reference in New Issue
Block a user