Skip to content

Commit

Permalink
Fix bottom height with env(safe-area-inset-bottom)
Browse files Browse the repository at this point in the history
  • Loading branch information
LitoMore committed Nov 5, 2024
1 parent edf302a commit 58720fc
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/templates.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@

<!--toobar-->
<template name="toolbar">
<view class="toolbar" style="padding-bottom: {{bottomHeight}}rpx;">
<view class="toolbar" style="padding-bottom: env(safe-area-inset-bottom);">
<view class="flex_item" catchtap="reply">
<image src="/assets/reply.svg" class="size30" animation="{{replyPop}}" />
</view>
Expand All @@ -235,7 +235,7 @@

<!--toobar-->
<template name="toolbar_msg">
<view class="toolbar" style="padding-bottom: {{bottomHeight}}rpx;">
<view class="toolbar" style="padding-bottom: env(safe-area-inset-bottom);">
<view class="flex_item" catchtap="reply">
<image src="/assets/reply.svg" class="size30" animation="{{replyPop}}" />
</view>
Expand Down
1 change: 0 additions & 1 deletion src/pages/feed/feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Page(
extend({}, tap, post, {
data: {
statusBarHeight: wx.getSystemInfoSync().statusBarHeight,
bottomHeight: wx.getSystemInfoSync().statusBarHeight,
hide: false,
},
onLoad(event) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/feed/feed.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<view class="aboveToolbar" style="padding-top: {{param ? 235: 0}}px;">
<template is="feeds_context" data="{{feed, feeds_arr, imageFadeIn, userAvatarFadeIn, hide}}" />
</view>
<template wx:if="{{!hide}}" is="toolbar" data="{{feed, replyPop, repostPop, starPop, deletePop, bottomHeight}}" />
<template wx:if="{{!hide}}" is="toolbar" data="{{feed, replyPop, repostPop, starPop, deletePop}}" />
</block>
<block wx:if="{{param}}">
<view class="mask">
Expand Down
1 change: 0 additions & 1 deletion src/pages/message/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Page(
id: null,
data: {
statusBarHeight: wx.getSystemInfoSync().statusBarHeight,
bottomHeight: wx.getSystemInfoSync().statusBarHeight,
},
onLoad(event) {
this.setData({i18n})
Expand Down
2 changes: 1 addition & 1 deletion src/pages/message/message.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<template is="message_arr" data="{{message_arr: feeds_arr}}" />
</view>
<template data="{{showLoader}}" is="loader" />
<template is="toolbar_msg" data="{{feed, replyPop, bottomHeight}}" />
<template is="toolbar_msg" data="{{feed, replyPop}}" />
<block wx:if="{{param}}">
<view class="mask">
<template is="post" data="{{param, posting, autoFocus: true, noPhoto: true, length, i18n, resetPop, sendPop, statusBarHeight}}" />
Expand Down

0 comments on commit 58720fc

Please sign in to comment.