From 944d8e6f3caa8d300d0f4f0aa6a66e539b7c8a5f Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 18 Feb 2025 05:01:03 -0800 Subject: [PATCH] remove redundant main thread dispatch in RCTDeviceInfo (#49479) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49479 changelog: [internal] Notification UIApplicationDidBecomeActiveNotification is always delivered on the main thread, no need for dispatch. Reviewed By: javache Differential Revision: D69750103 fbshipit-source-id: 070fa7f95d8ecddff5d56ba317c8ed4f0ad880f8 --- packages/react-native/React/CoreModules/RCTDeviceInfo.mm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm index 8e89bfd6a2e..193e97448de 100644 --- a/packages/react-native/React/CoreModules/RCTDeviceInfo.mm +++ b/packages/react-native/React/CoreModules/RCTDeviceInfo.mm @@ -233,14 +233,6 @@ static NSDictionary *RCTExportedDimensions(CGFloat fontScale) } - (void)interfaceOrientationDidChange -{ - __weak __typeof(self) weakSelf = self; - RCTExecuteOnMainQueue(^{ - [weakSelf _interfaceOrientationDidChange]; - }); -} - -- (void)_interfaceOrientationDidChange { #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST UIApplication *application = RCTSharedApplication();