Skip to content

Commit

Permalink
Only ignore AnimatedProps that use vectorized animation on iOS
Browse files Browse the repository at this point in the history
Summary:
facebook#37925 mitigated an issue where vectorized animations (e.g. AnimatedColor) would flicker. This issue was never present in Android. In face, it somehow introduced the issues it solved for iOS onto Android.

## Changelog
[General][Fixed] - AnimatedColor flickering on Android

Differential Revision: D47114536

fbshipit-source-id: 3785d663808236bbd15ff49702564e5fe94d77e1
  • Loading branch information
James Maxell Eroy authored and facebook-github-bot committed Jun 29, 2023
1 parent 8d3df56 commit 1e16eab
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig';
import type AnimatedNode from '../nodes/AnimatedNode';
import type AnimatedValue from '../nodes/AnimatedValue';

import Platform from '../../Utilities/Platform';
import NativeAnimatedHelper from '../NativeAnimatedHelper';
import AnimatedColor from '../nodes/AnimatedColor';
import AnimatedProps from '../nodes/AnimatedProps';
Expand Down Expand Up @@ -84,7 +85,10 @@ export default class Animation {
// may not have completed yet. For example, only the animation for the red channel of
// an animating color may have been completed, resulting in a temporary red color
// being rendered. So, for now, ignore AnimatedProps that use a vectorized animation.
if (node instanceof AnimatedValueXY || node instanceof AnimatedColor) {
if (
Platform.OS === 'ios' &&
(node instanceof AnimatedValueXY || node instanceof AnimatedColor)
) {
return result;
}

Expand Down

0 comments on commit 1e16eab

Please sign in to comment.