mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 03:26:07 +00:00
Harmonize native animation callback args with JS
Summary: `Animated.parallel` among other functions expects the `start(callback)` function to be invoked with an `endState` object. Currently natively driven animations call the handler with `null`, this PR changes that to `{ finished: true }`. **Test plan** This should not throw any errors: ```js Animated.parallel([ Animated.timing( new Animated.Value(0), { toValue: 1, useNativeDriver: true } ), Animated.timing( new Animated.Value(0), { toValue: 1, useNativeDriver: true } ) ]).start(); ``` Closes https://github.com/facebook/react-native/pull/8567 Differential Revision: D3517291 Pulled By: javache fbshipit-source-id: 0056a5b4261546b061451c0b1b249718739086bc
This commit is contained in:
parent
0d58314fa6
commit
cc816fbd82
@ -68,7 +68,9 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
[self stopAnimation];
|
||||
_valueNode = nil;
|
||||
if (_callback) {
|
||||
_callback(@[(id)kCFNull]);
|
||||
_callback(@[@{
|
||||
@"finished": @(_animationHasFinished)
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user