Skip to content

Commit

Permalink
Clean up Layout Animation initialisation
Browse files Browse the repository at this point in the history
Summary:
changelog: [internal]

No need for ivar here.

Reviewed By: sshic

Differential Revision: D30726786

fbshipit-source-id: ba8f71c9f182c1afbfd5118adc15a098d9f56027
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Sep 7, 2021
1 parent 8c25711 commit 4f0671b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions React/Fabric/RCTScheduler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,17 @@ @implementation RCTScheduler {
std::shared_ptr<SchedulerDelegateProxy> _delegateProxy;
std::shared_ptr<LayoutAnimationDelegateProxy> _layoutAnimationDelegateProxy;
RunLoopObserver::Unique _uiRunLoopObserver;
BOOL _layoutAnimationsEnabled;
}

- (instancetype)initWithToolbox:(SchedulerToolbox)toolbox
{
if (self = [super init]) {
auto reactNativeConfig =
toolbox.contextContainer->at<std::shared_ptr<const ReactNativeConfig>>("ReactNativeConfig");
_layoutAnimationsEnabled = reactNativeConfig->getBool("react_fabric:enabled_layout_animations_ios");

_delegateProxy = std::make_shared<SchedulerDelegateProxy>((__bridge void *)self);

if (_layoutAnimationsEnabled) {
if (reactNativeConfig->getBool("react_fabric:enabled_layout_animations_ios")) {
_layoutAnimationDelegateProxy = std::make_shared<LayoutAnimationDelegateProxy>((__bridge void *)self);
_animationDriver =
std::make_shared<LayoutAnimationDriver>(toolbox.runtimeExecutor, _layoutAnimationDelegateProxy.get());
Expand Down

0 comments on commit 4f0671b

Please sign in to comment.