Skip to content

Commit 18ce003

Browse files
committed
make requested change
1 parent 7d0d04d commit 18ce003

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/react-native/React/CoreModules/RCTAppearance.mm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ - (instancetype)init
7272
if ((self = [super init])) {
7373
UITraitCollection *traitCollection = RCTSharedApplication().delegate.window.traitCollection;
7474
_currentColorScheme = RCTColorSchemePreference(traitCollection);
75+
[[NSNotificationCenter defaultCenter] addObserver:self
76+
selector:@selector(appearanceChanged:)
77+
name:RCTUserInterfaceStyleDidChangeNotification
78+
object:nil];
7579
}
7680
return self;
7781
}
@@ -131,10 +135,7 @@ - (void)appearanceChanged:(NSNotification *)notification
131135

132136
- (void)startObserving
133137
{
134-
[[NSNotificationCenter defaultCenter] addObserver:self
135-
selector:@selector(appearanceChanged:)
136-
name:RCTUserInterfaceStyleDidChangeNotification
137-
object:nil];
138+
138139
}
139140

140141
- (void)stopObserving

0 commit comments

Comments
 (0)