Rocket.Chat.ReactNative/app/utils/layoutAnimation.js

24 lines
561 B
JavaScript
Raw Normal View History

import { LayoutAnimation } from 'react-native';
import debounce from './debounce';
import { isIOS } from './deviceInfo';
export const animateNextTransition = debounce(() => {
if (isIOS) {
LayoutAnimation.configureNext({
duration: 200,
create: {
type: LayoutAnimation.Types.easeInEaseOut,
property: LayoutAnimation.Properties.opacity
},
update: {
type: LayoutAnimation.Types.easeInEaseOut
},
delete: {
type: LayoutAnimation.Types.easeInEaseOut,
property: LayoutAnimation.Properties.opacity
}
});
}
}, 200, true);