Skip to content

Commit

Permalink
Merge pull request Expensify#34105 from mkhutornyi/fix-33712
Browse files Browse the repository at this point in the history
remove extra padding below emoji skin tone selection when keyboard is up
  • Loading branch information
tgolen authored Jan 29, 2024
2 parents 5c8a341 + c96835f commit ef151c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Modal/BaseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, {forwardRef, useCallback, useEffect, useMemo, useRef} from 'react'
import {View} from 'react-native';
import ReactNativeModal from 'react-native-modal';
import ColorSchemeWrapper from '@components/ColorSchemeWrapper';
import useKeyboardState from '@hooks/useKeyboardState';
import usePrevious from '@hooks/usePrevious';
import useSafeAreaInsets from '@hooks/useSafeAreaInsets';
import useStyleUtils from '@hooks/useStyleUtils';
Expand Down Expand Up @@ -47,6 +48,7 @@ function BaseModal(
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const {windowWidth, windowHeight, isSmallScreenWidth} = useWindowDimensions();
const keyboardStateContextValue = useKeyboardState();

const safeAreaInsets = useSafeAreaInsets();

Expand Down Expand Up @@ -163,7 +165,7 @@ function BaseModal(
safeAreaPaddingRight,
shouldAddBottomSafeAreaMargin,
shouldAddTopSafeAreaMargin,
shouldAddBottomSafeAreaPadding,
shouldAddBottomSafeAreaPadding: !keyboardStateContextValue?.isKeyboardShown && shouldAddBottomSafeAreaPadding,
shouldAddTopSafeAreaPadding,
modalContainerStyleMarginTop: modalContainerStyle.marginTop,
modalContainerStyleMarginBottom: modalContainerStyle.marginBottom,
Expand Down

0 comments on commit ef151c3

Please sign in to comment.