From 2599cc6b1f8a883d2597be373795aaec79e9a0c1 Mon Sep 17 00:00:00 2001 From: Phillip Pan Date: Thu, 11 May 2023 20:51:46 -0700 Subject: [PATCH] decouple RCTDevLoadingView from RCTBundleManager Summary: Changelog: [Internal] not used, remove Reviewed By: cipolleschi Differential Revision: D45756364 fbshipit-source-id: e825efba6adc45b3ff3b39d2e9c5a8fd95eec4a1 --- .../React/CoreModules/RCTDevLoadingView.mm | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm index 19ccd0398f5d72..8ea5edb281225e 100644 --- a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm +++ b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm @@ -35,8 +35,6 @@ @implementation RCTDevLoadingView { dispatch_block_t _initialMessageBlock; } -@synthesize bundleManager = _bundleManager; - RCT_EXPORT_MODULE() - (instancetype)init @@ -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) {