Add support for new iPhone models in missing places (#2180)

This commit is contained in:
Elias Nahum 2018-09-27 10:16:19 -03:00 committed by Harrison Healey
parent 13aaefa0ac
commit eab1ab7c0c
8 changed files with 8 additions and 8 deletions

View file

@ -86,7 +86,7 @@ export default class Autocomplete extends PureComponent {
listHeight() {
let offset = Platform.select({ios: 65, android: 75});
if (DeviceInfo.getModel() === 'iPhone X') {
if (DeviceInfo.getModel().includes('iPhone X')) {
offset = 90;
}
return this.props.deviceHeight - offset - this.state.keyboardOffset;

View file

@ -47,7 +47,7 @@ export default class ClientUpgradeListener extends PureComponent {
constructor(props) {
super(props);
this.isX = DeviceInfo.getModel() === 'iPhone X';
this.isX = DeviceInfo.getModel().includes('iPhone X');
MaterialIcon.getImageSource('close', 20, this.props.theme.sidebarHeaderTextColor).then((source) => {
this.closeButton = source;

View file

@ -75,7 +75,7 @@ export default class EmojiPicker extends PureComponent {
const emojis = this.renderableEmojis(props.emojisBySection, props.deviceWidth);
const emojiSectionIndexByOffset = this.measureEmojiSections(emojis);
this.isX = DeviceInfo.getModel() === 'iPhone X';
this.isX = DeviceInfo.getModel().includes('iPhone X');
this.scrollToSectionTries = 0;
this.state = {
emojis,

View file

@ -55,7 +55,7 @@ export default class OfflineIndicator extends Component {
constructor(props) {
super(props);
this.isX = DeviceInfo.getModel() === 'iPhone X';
this.isX = DeviceInfo.getModel().includes('iPhone X');
const navBar = this.getNavBarHeight(props.isLandscape);
this.state = {

View file

@ -28,7 +28,7 @@ export default class EmptyToolbar extends PureComponent {
constructor(props) {
super(props);
this.isX = DeviceInfo.getModel() === 'iPhone X';
this.isX = DeviceInfo.getModel().includes('iPhone X');
}
render() {

View file

@ -75,7 +75,7 @@ export default class Channel extends PureComponent {
constructor(props) {
super(props);
this.isX = DeviceInfo.getModel() === 'iPhone X';
this.isX = DeviceInfo.getModel().includes('iPhone X');
if (LocalConfig.EnableMobileClientUpgrade && !ClientUpgradeListener) {
ClientUpgradeListener = require('app/components/client_upgrade_listener').default;

View file

@ -35,7 +35,7 @@ export default class ChannelNavBar extends PureComponent {
constructor(props) {
super(props);
this.isX = DeviceInfo.getModel() === 'iPhone X';
this.isX = DeviceInfo.getModel().includes('iPhone X');
}
render() {

View file

@ -88,7 +88,7 @@ export default class Search extends PureComponent {
super(props);
props.navigator.setOnNavigatorEvent(this.onNavigatorEvent);
this.isX = DeviceInfo.getModel() === 'iPhone X';
this.isX = DeviceInfo.getModel().includes('iPhone X');
this.state = {
channelName: '',
cursorPosition: 0,