Post Menu initial position to show one option cut off (#2453)

This commit is contained in:
Elias Nahum 2018-12-13 08:39:32 -03:00
parent 170243fdd7
commit c1cc5f285d
No known key found for this signature in database
GPG key ID: E038DB71E0B61702

View file

@ -9,6 +9,7 @@ import MaterialIcon from 'react-native-vector-icons/MaterialIcons';
import SlideUpPanel from 'app/components/slide_up_panel';
import {BOTTOM_MARGIN} from 'app/components/slide_up_panel/slide_up_panel';
import DeviceTypes from 'app/constants/device';
import PostOption from './post_option';
@ -387,6 +388,7 @@ export default class PostOptions extends PureComponent {
const {deviceHeight} = this.props;
const options = this.getPostOptions();
const marginFromTop = deviceHeight - BOTTOM_MARGIN - ((options.length + 1) * OPTION_HEIGHT);
const initialPosition = DeviceTypes.IS_IPHONE_X ? 280 : 305;
return (
<View style={style.container}>
@ -395,7 +397,7 @@ export default class PostOptions extends PureComponent {
ref={this.refSlideUpPanel}
marginFromTop={marginFromTop}
onRequestClose={this.close}
initialPosition={290}
initialPosition={initialPosition}
>
{options}
</SlideUpPanel>