Changing Order Of mOverrideColorScheme In Constructor

Summary:
Changelog: [Android] [Updated]

mOverrideColorScheme should be assigned before the first colorSchemeForCurrentConfiguration call, so the initial setting of mColorScheme will reflect the override

Reviewed By: zackargyle

Differential Revision: D20630173

fbshipit-source-id: a2a2d174d3fc40c14f27dce6a7fa8e67203480c9
This commit is contained in:
Jack Wang
2020-03-24 15:33:40 -07:00
committed by Facebook GitHub Bot
parent 84b7b8d076
commit 05e2ec601b
@@ -47,8 +47,8 @@ public class AppearanceModule extends NativeAppearanceSpec {
ReactApplicationContext reactContext, @Nullable OverrideColorScheme overrideColorScheme) {
super(reactContext);
mColorScheme = colorSchemeForCurrentConfiguration(reactContext);
mOverrideColorScheme = overrideColorScheme;
mColorScheme = colorSchemeForCurrentConfiguration(reactContext);
}
private String colorSchemeForCurrentConfiguration(Context context) {