Skip to content

Commit

Permalink
Remove feature flag removeListenersOnDetach
Browse files Browse the repository at this point in the history
Summary:
changelog: [internal]

Remove unused feature flag.

Reviewed By: yungsters

Differential Revision: D41188496

fbshipit-source-id: 13507197e7943aea9303ffb828feddb77c94ab0c
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Nov 15, 2022
1 parent b8893c7 commit 49d5e7c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions Libraries/Animated/nodes/AnimatedNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ export default class AnimatedNode {
__nativeAnimatedValueListener: ?any;
__attach(): void {}
__detach(): void {
if (ReactNativeFeatureFlags.removeListenersOnDetach()) {
this.removeAllListeners();
}
this.removeAllListeners();
if (this.__isNative && this.__nativeTag != null) {
NativeAnimatedHelper.API.dropAnimatedNode(this.__nativeTag);
this.__nativeTag = undefined;
Expand Down
3 changes: 0 additions & 3 deletions Libraries/ReactNative/ReactNativeFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ export type FeatureFlags = {|
* to render react components driven by classes written in C++.
*/
enableCppRenderSystem: () => boolean,

removeListenersOnDetach: () => boolean,
|};

const ReactNativeFeatureFlags: FeatureFlags = {
Expand All @@ -54,7 +52,6 @@ const ReactNativeFeatureFlags: FeatureFlags = {
animatedShouldDebounceQueueFlush: () => false,
animatedShouldUseSingleOp: () => false,
enableCppRenderSystem: () => false,
removeListenersOnDetach: () => false,
};

module.exports = ReactNativeFeatureFlags;

0 comments on commit 49d5e7c

Please sign in to comment.