Skip to content

Commit ea061bb

Browse files
committed
update top padding for new iPhones
1 parent 2445f61 commit ea061bb

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

js/Discourse.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ class Discourse extends React.Component {
187187
DeviceInfo.getDeviceType() === 'Desktop';
188188

189189
this.state = {
190-
hasNotch: DeviceInfo.hasNotch(),
191190
deviceId: DeviceInfo.getDeviceId(),
192191
largerUI: largerUI,
193192
theme: colorScheme === 'dark' ? themes.dark : themes.light,
@@ -494,7 +493,6 @@ class Discourse extends React.Component {
494493
this._seenNotificationMap = map;
495494
},
496495
siteManager: this._siteManager,
497-
hasNotch: this.state.hasNotch,
498496
deviceId: this.state.deviceId,
499497
largerUI: this.state.largerUI,
500498
toggleTheme: this._toggleTheme.bind(this),

js/screens/WebViewScreenComponents/WebViewComponent.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ class WebViewComponent extends React.Component {
6969
errorData: null,
7070
userAgentSuffix: 'DiscourseHub',
7171
layoutCalculated: false,
72-
hasNotch: this.props.screenProps.hasNotch,
7372
isLandscape: false,
7473
webviewUrl: this.props.url,
7574
authProcessActive: false,
@@ -124,12 +123,10 @@ class WebViewComponent extends React.Component {
124123
}
125124

126125
get viewTopPadding() {
127-
if (Platform.isPad) {
128-
return 15;
126+
if (this.props.insets.top) {
127+
return this.props.insets.top;
129128
} else if (this.state.isLandscape) {
130129
return 10;
131-
} else if (this.state.hasNotch) {
132-
return this.props.insets.top;
133130
} else {
134131
return 20;
135132
}

0 commit comments

Comments
 (0)