Skip to content

Commit

Permalink
Merge pull request #10546 from Expensify/Rory-FixPaymentsPageBug
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham authored Aug 24, 2022
2 parents 4f23632 + 4008335 commit df44a2f
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/components/KeyboardSpacer/BaseKeyboardSpacer.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
import React, {PureComponent} from 'react';
import {
Dimensions, Keyboard, LayoutAnimation, View,
Dimensions, Keyboard, View,
} from 'react-native';
import * as StyleUtils from '../../styles/StyleUtils';
import {propTypes, defaultProps} from './BaseKeyboardSpacerPropTypes';

const defaultAnimation = {
duration: 500,
create: {
duration: 300,
type: LayoutAnimation.Types.easeInEaseOut,
property: LayoutAnimation.Properties.opacity,
},
update: {
type: LayoutAnimation.Types.spring,
springDamping: 200,
},
};

class BaseKeyboardSpacer extends PureComponent {
constructor(props) {
super(props);
Expand Down Expand Up @@ -52,7 +39,6 @@ class BaseKeyboardSpacer extends PureComponent {
return;
}

LayoutAnimation.configureNext(defaultAnimation);
const screenHeight = Dimensions.get('window').height;
const keyboardSpace = (screenHeight - event.endCoordinates.screenY) + this.props.topSpacing;
this.setState({
Expand All @@ -66,8 +52,6 @@ class BaseKeyboardSpacer extends PureComponent {
* @param {Object} [event] - A Keyboard Event.
*/
resetKeyboardSpace() {
LayoutAnimation.configureNext(defaultAnimation);

this.setState({
keyboardSpace: 0,
}, this.props.onToggle(false, 0));
Expand Down

0 comments on commit df44a2f

Please sign in to comment.