Skip to content

Commit

Permalink
Fix bottom height for iPhone X later devices
Browse files Browse the repository at this point in the history
  • Loading branch information
LitoMore committed Nov 5, 2024
1 parent cb20259 commit 712a6fd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/pages/feed/feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ const animations = require('../../utils/animations')
const post = require('../../mixins/post')
const tap = require('../../mixins/tap')
const i18n = require('../../i18n/index')
const util = require('../../utils/util')
const vibrate = require('../../utils/vibrate')

Page(
extend({}, tap, post, {
data: {
statusBarHeight: wx.getSystemInfoSync().statusBarHeight,
bottomHeight: util.isIpx() ? 64 : 0,
bottomHeight: wx.getSystemInfoSync().statusBarHeight,
hide: false,
},
onLoad(event) {
Expand Down
3 changes: 1 addition & 2 deletions src/pages/message/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const extend = require('../../utils/extend')
const animations = require('../../utils/animations')
const post = require('../../mixins/post')
const i18n = require('../../i18n/index')
const util = require('../../utils/util')
const vibrate = require('../../utils/vibrate')

const url = '/direct_messages/conversation'
Expand All @@ -13,7 +12,7 @@ Page(
id: null,
data: {
statusBarHeight: wx.getSystemInfoSync().statusBarHeight,
bottomHeight: util.isIpx() ? 64 : 0,
bottomHeight: wx.getSystemInfoSync().statusBarHeight,
},
onLoad(event) {
this.setData({i18n})
Expand Down
5 changes: 0 additions & 5 deletions src/utils/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,9 @@ function getBlockIds() {
return blockIds
}

function isIpx() {
return Boolean(wx.getSystemInfoSync().model.match('iPhone X'))
}

module.exports = {
formatTime,
getSettings,
getBlocks,
getBlockIds,
isIpx,
}

0 comments on commit 712a6fd

Please sign in to comment.