LayoutAnimations: call onSuccess, onFailure callbacks

Summary:
Hook up onSuccess and onFailure callbacks to LayoutAnimations.

Note that in non-Fabric RN, onSuccess is not known to work in Android. I could not find any uses of onFailure and it's not documented, so for now, it is only called if the setup of the animation fails.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D22889352

fbshipit-source-id: 4306debb350388dd2b7a2cbfe295eb99723988e2
This commit is contained in:
Joshua Gross
2020-08-02 16:34:31 -07:00
committed by Facebook GitHub Bot
parent 777957c6fb
commit e3302eeeab
10 changed files with 152 additions and 31 deletions
@@ -285,7 +285,8 @@ void Binding::installFabricUIManager(
}
if (enableLayoutAnimations) {
animationDriver_ = std::make_shared<LayoutAnimationDriver>(this);
animationDriver_ =
std::make_shared<LayoutAnimationDriver>(runtimeExecutor, this);
}
scheduler_ = std::make_shared<Scheduler>(
toolbox, (animationDriver_ ? animationDriver_.get() : nullptr), this);