File tree 1 file changed +5
-4
lines changed
packages/react-native/React/CoreModules
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ - (instancetype)init
72
72
if ((self = [super init ])) {
73
73
UITraitCollection *traitCollection = RCTSharedApplication ().delegate .window .traitCollection ;
74
74
_currentColorScheme = RCTColorSchemePreference (traitCollection);
75
+ [[NSNotificationCenter defaultCenter ] addObserver: self
76
+ selector: @selector (appearanceChanged: )
77
+ name: RCTUserInterfaceStyleDidChangeNotification
78
+ object: nil ];
75
79
}
76
80
return self;
77
81
}
@@ -131,10 +135,7 @@ - (void)appearanceChanged:(NSNotification *)notification
131
135
132
136
- (void )startObserving
133
137
{
134
- [[NSNotificationCenter defaultCenter ] addObserver: self
135
- selector: @selector (appearanceChanged: )
136
- name: RCTUserInterfaceStyleDidChangeNotification
137
- object: nil ];
138
+
138
139
}
139
140
140
141
- (void )stopObserving
You can’t perform that action at this time.
0 commit comments