Prevent layout shift with align_start
This commit is contained in:
@@ -191,11 +191,14 @@ let PostControls = ({
|
|||||||
a.justify_between,
|
a.justify_between,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
!big && a.pt_2xs,
|
!big && a.pt_2xs,
|
||||||
|
a.gap_md,
|
||||||
style,
|
style,
|
||||||
]}>
|
]}>
|
||||||
<View style={[a.flex_row, a.justify_between, a.flex_1]}>
|
<View style={[a.flex_row, a.flex_1]}>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
|
a.flex_1,
|
||||||
|
a.align_start,
|
||||||
{marginLeft: big ? -2 : -6},
|
{marginLeft: big ? -2 : -6},
|
||||||
replyDisabled ? {opacity: 0.5} : undefined,
|
replyDisabled ? {opacity: 0.5} : undefined,
|
||||||
]}>
|
]}>
|
||||||
@@ -225,6 +228,7 @@ let PostControls = ({
|
|||||||
)}
|
)}
|
||||||
</PostControlButton>
|
</PostControlButton>
|
||||||
</View>
|
</View>
|
||||||
|
<View style={[a.flex_1, a.align_start]}>
|
||||||
<RepostButton
|
<RepostButton
|
||||||
isReposted={!!post.viewer?.repost}
|
isReposted={!!post.viewer?.repost}
|
||||||
repostCount={(post.repostCount ?? 0) + (post.quoteCount ?? 0)}
|
repostCount={(post.repostCount ?? 0) + (post.quoteCount ?? 0)}
|
||||||
@@ -233,6 +237,8 @@ let PostControls = ({
|
|||||||
big={big}
|
big={big}
|
||||||
embeddingDisabled={Boolean(post.viewer?.embeddingDisabled)}
|
embeddingDisabled={Boolean(post.viewer?.embeddingDisabled)}
|
||||||
/>
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={[a.flex_1, a.align_start]}>
|
||||||
<PostControlButton
|
<PostControlButton
|
||||||
testID="likeBtn"
|
testID="likeBtn"
|
||||||
big={big}
|
big={big}
|
||||||
@@ -272,6 +278,7 @@ let PostControls = ({
|
|||||||
hasBeenToggled={hasLikeIconBeenToggled}
|
hasBeenToggled={hasLikeIconBeenToggled}
|
||||||
/>
|
/>
|
||||||
</PostControlButton>
|
</PostControlButton>
|
||||||
|
</View>
|
||||||
{/* Spacer! */}
|
{/* Spacer! */}
|
||||||
<View />
|
<View />
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user