correctly pass down isLooping in parallel animation (#46429)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46429

Right now if I create a `Animated.loop(Animated.parallel(...))`, `config.__isLooping` for nested animations are not `true`. The reason is Animated.parallel doesn't pass down `isLooping`. This change is fixing that.

Changelog: [General][Fixed] - correctly pass down isLooping in parallel animation

Reviewed By: cipolleschi

Differential Revision: D62473189

fbshipit-source-id: 405dd36aa008cc965599ff82333b5552df1eb41f
This commit is contained in:
Zeya Peng authored and Facebook GitHub Bot committed 2024-09-11 09:58:04 -07:00
1 parent 94489d563d
commit 4014aa4528
1 file changed
+2 -2
@@ -373,7 +373,7 @@ const parallel = function (
const stopTogether = !(config && config.stopTogether === false);
const result = {
start: function (callback?: ?EndCallback) {
start: function (callback?: ?EndCallback, isLooping?: boolean) {
if (doneCount === animations.length) {
callback && callback({finished: true});
return;
@@ -397,7 +397,7 @@ const parallel = function (
if (!animation) {
cb({finished: true});
} else {
animation.start(cb);
animation.start(cb, isLooping);
}
});
},