Authored by 孙凯

add 适配 iPhoneX review by hongmo

... ... @@ -26,6 +26,7 @@ import YH_ToolTips from '../../../common/components/YH_ToolTips'
import MessageListEditBottomView from './MessageListEditBottomView'
import MessageListActivityCell from './MessageListActivityCell'
import MessageListProductCell from './MessageListProductCell'
import DeviceInfo from 'react-native-device-info';
export default class MessageList extends Component {
constructor(props) {
... ... @@ -275,6 +276,12 @@ export default class MessageList extends Component {
let isAllSelected = selectionList.size == list.size;
let offset = 0;
if (deviceId == 'iPhone10,3' || deviceId == 'iPhone10,6')
{
offset = 34;
}
if (shouldShowEmpty) {
return (
<View style={styles.container}>
... ... @@ -286,7 +293,7 @@ export default class MessageList extends Component {
);
}
return (
<View style={styles.container}>
<View style={{flex: 1,backgroundColor: '#f0f0f0',bottom: offset}}>
<ListView
contentContainerStyle={styles.contentContainer}
dataSource={this.dataSource.cloneWithRows(list.toArray())}
... ... @@ -336,6 +343,7 @@ export default class MessageList extends Component {
}
let {width, height} = Dimensions.get('window');
let deviceId = DeviceInfo.getDeviceId();
let styles = StyleSheet.create({
container: {
... ...