Skip to content

Commit

Permalink
Remove gating for AnimatedObject (#36934)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #36934

Embarrassingly, the check for ReactNativeFeatureFlags.isAnimatedObjectEnabled wasn't actually useful since it's a function...it's been working as expected, so remove this gating since it's not doing anything.

Changelog:
[Internal] - Remove gating for AnimatedObject

Reviewed By: mdvacca

Differential Revision: D45055855

fbshipit-source-id: c30b3c04efc0e919059dbcb75a5adfea90610b85
  • Loading branch information
genkikondo authored and facebook-github-bot committed Apr 18, 2023
1 parent deb6b38 commit 07df82b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import type {PlatformConfig} from '../AnimatedPlatformConfig';

import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags';
import {findNodeHandle} from '../../ReactNative/RendererProxy';
import {AnimatedEvent} from '../AnimatedEvent';
import NativeAnimatedHelper from '../NativeAnimatedHelper';
Expand All @@ -29,10 +28,7 @@ function createAnimatedProps(inputProps: Object): Object {
props[key] = new AnimatedStyle(value);
} else if (value instanceof AnimatedNode) {
props[key] = value;
} else if (
ReactNativeFeatureFlags.isAnimatedObjectEnabled &&
hasAnimatedNode(value)
) {
} else if (hasAnimatedNode(value)) {
props[key] = new AnimatedObject(value);
} else {
props[key] = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import type {PlatformConfig} from '../AnimatedPlatformConfig';

import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags';
import flattenStyle from '../../StyleSheet/flattenStyle';
import Platform from '../../Utilities/Platform';
import NativeAnimatedHelper from '../NativeAnimatedHelper';
Expand All @@ -34,10 +33,7 @@ function createAnimatedStyle(
animatedStyles[key] = new AnimatedTransform(value);
} else if (value instanceof AnimatedNode) {
animatedStyles[key] = value;
} else if (
ReactNativeFeatureFlags.isAnimatedObjectEnabled &&
hasAnimatedNode(value)
) {
} else if (hasAnimatedNode(value)) {
animatedStyles[key] = new AnimatedObject(value);
} else if (keepUnanimatedValues) {
animatedStyles[key] = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ export type FeatureFlags = {|
* Enables access to the host tree in Fabric using DOM-compatible APIs.
*/
enableAccessToHostTreeInFabric: () => boolean,
/**
* Enables animating object and array prop values.
*/
isAnimatedObjectEnabled: () => boolean,
|};

const ReactNativeFeatureFlags: FeatureFlags = {
Expand All @@ -59,7 +55,6 @@ const ReactNativeFeatureFlags: FeatureFlags = {
animatedShouldUseSingleOp: () => false,
isGlobalWebPerformanceLoggerEnabled: () => false,
enableAccessToHostTreeInFabric: () => false,
isAnimatedObjectEnabled: () => false,
};

module.exports = ReactNativeFeatureFlags;

0 comments on commit 07df82b

Please sign in to comment.