Skip to content

Commit

Permalink
decouple RCTDevLoadingView from RCTBundleManager
Browse files Browse the repository at this point in the history
Summary:
Changelog: [Internal]

not used, remove

Reviewed By: cipolleschi

Differential Revision: D45756364

fbshipit-source-id: e825efba6adc45b3ff3b39d2e9c5a8fd95eec4a1
  • Loading branch information
philIip authored and facebook-github-bot committed May 12, 2023
1 parent 2acd5c0 commit 2599cc6
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions packages/react-native/React/CoreModules/RCTDevLoadingView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ @implementation RCTDevLoadingView {
dispatch_block_t _initialMessageBlock;
}

@synthesize bundleManager = _bundleManager;

RCT_EXPORT_MODULE()

- (instancetype)init
Expand Down Expand Up @@ -85,25 +83,6 @@ - (void)showInitialMessageDelayed:(void (^)())initialMessage
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) {
Expand Down

0 comments on commit 2599cc6

Please sign in to comment.