Skip to content

Commit 16a476c

Browse files
zhongwuzwfacebook-github-bot
authored andcommitted
Fabric: Fix over reporting trait changes (#49431)
Summary: Fixes #49330. We can keep the same logic as paper arch , please see #39439. ## Changelog: [IOS] [FIXED] - Fabric: Fix over reporting trait changes Pull Request resolved: #49431 Test Plan: Repro in #49330. Reviewed By: rshest Differential Revision: D69740128 Pulled By: javache fbshipit-source-id: 2946df68ab7eb88809c21dfcf33ce23f4cd6cb41
1 parent e065411 commit 16a476c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ - (void)setActivityIndicatorViewFactory:(RCTSurfaceHostingViewActivityIndicatorV
200200
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection
201201
{
202202
[super traitCollectionDidChange:previousTraitCollection];
203+
204+
if (RCTSharedApplication().applicationState == UIApplicationStateBackground) {
205+
return;
206+
}
207+
203208
[[NSNotificationCenter defaultCenter]
204209
postNotificationName:RCTUserInterfaceStyleDidChangeNotification
205210
object:self

0 commit comments

Comments
 (0)