mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
5da4872775
Summary: The current implementation of the prelive composer is setting the RN override preference to nil when live shopping ends. However, if the user had a previously set appearance override, this would clear it out. To resolve this, I cache the user's override preference before we override it, and restore it when live shopping ends. Additionally, I'm adding a missing callback to restore the override pref when live shopping is dismissed, but not cancelled. Changelog: [ReactiveNative][Appearance] - Add function to retrieve overridden RN appearance Differential Revision: D32564739 fbshipit-source-id: d0b4e06d2bbadad68f172d951609cba3e4587e5d
20 lines
623 B
Objective-C
20 lines
623 B
Objective-C
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import <React/RCTBridgeModule.h>
|
|
#import <React/RCTEventEmitter.h>
|
|
|
|
RCT_EXTERN void RCTEnableAppearancePreference(BOOL enabled);
|
|
RCT_EXTERN void RCTOverrideAppearancePreference(NSString *const);
|
|
RCT_EXTERN NSString *RCTCurrentOverrideAppearancePreference();
|
|
RCT_EXTERN NSString *RCTColorSchemePreference(UITraitCollection *traitCollection);
|
|
|
|
@interface RCTAppearance : RCTEventEmitter <RCTBridgeModule>
|
|
@end
|