Rm pointer events

This commit is contained in:
Dan Abramov
2024-01-19 04:16:32 +00:00
parent 7975a04441
commit 296ab76535
4 changed files with 13 additions and 23 deletions
+2 -6
View File
@@ -242,12 +242,8 @@ let PagerTabBar = ({
],
}))
return (
<Animated.View
pointerEvents="box-none"
style={[styles.tabBarMobile, headerTransform]}>
<View onLayout={onHeaderOnlyLayout} pointerEvents="box-none">
{renderHeader?.()}
</View>
<Animated.View style={[styles.tabBarMobile, headerTransform]}>
<View onLayout={onHeaderOnlyLayout}>{renderHeader?.()}</View>
<View
onLayout={onTabBarLayout}
style={{
+8 -10
View File
@@ -442,12 +442,10 @@ let ProfileHeaderLoaded = ({
const pluralizedFollowers = pluralize(profile.followersCount || 0, 'follower')
return (
<View style={pal.view} pointerEvents="box-none">
<View pointerEvents="none">
<UserBanner banner={profile.banner} moderation={moderation.avatar} />
</View>
<View style={styles.content} pointerEvents="box-none">
<View style={[styles.buttonsLine]} pointerEvents="box-none">
<View style={pal.view}>
<UserBanner banner={profile.banner} moderation={moderation.avatar} />
<View style={styles.content}>
<View style={[styles.buttonsLine]}>
{isMe ? (
<TouchableOpacity
testID="profileHeaderEditProfileButton"
@@ -567,7 +565,7 @@ let ProfileHeaderLoaded = ({
</NativeDropdown>
) : undefined}
</View>
<View pointerEvents="none">
<View>
<Text
testID="profileHeaderDisplayName"
type="title-2xl"
@@ -578,7 +576,7 @@ let ProfileHeaderLoaded = ({
)}
</Text>
</View>
<View style={styles.handleLine} pointerEvents="none">
<View style={styles.handleLine}>
{profile.viewer?.followedBy && !blockHide ? (
<View style={[styles.pill, pal.btn, s.mr5]}>
<Text type="xs" style={[pal.text]}>
@@ -599,7 +597,7 @@ let ProfileHeaderLoaded = ({
</View>
{!blockHide && (
<>
<View style={styles.metricsLine} pointerEvents="box-none">
<View style={styles.metricsLine}>
<Link
testID="profileHeaderFollowersButton"
style={[s.flexRow, s.mr10]}
@@ -648,7 +646,7 @@ let ProfileHeaderLoaded = ({
</Text>
</View>
{descriptionRT && !moderation.profile.blur ? (
<View pointerEvents={isNative ? 'auto' : 'none'}>
<View>
<RichText
testID="profileHeaderDescription"
style={[styles.description, pal.text]}
@@ -39,18 +39,14 @@ export function ProfileHeaderSuggestedFollows({
did: actorDid,
})
return (
<View
style={{paddingVertical: OUTER_PADDING, height: TOTAL_HEIGHT}}
pointerEvents="box-none">
<View style={{paddingVertical: OUTER_PADDING, height: TOTAL_HEIGHT}}>
<View
pointerEvents="box-none"
style={{
backgroundColor: pal.viewLight.backgroundColor,
height: '100%',
paddingTop: INNER_PADDING / 2,
}}>
<View
pointerEvents="box-none"
style={{
flexDirection: 'row',
justifyContent: 'space-between',
+2 -2
View File
@@ -77,7 +77,7 @@ export function RichText({
type={type}
text={segment.text}
href={`/profile/${mention.did}`}
style={[style, lineHeightStyle, pal.link, {pointerEvents: 'auto'}]}
style={[style, lineHeightStyle, pal.link]}
dataSet={WORD_WRAP}
/>,
)
@@ -88,7 +88,7 @@ export function RichText({
type={type}
text={toShortUrl(segment.text)}
href={link.uri}
style={[style, lineHeightStyle, pal.link, {pointerEvents: 'auto'}]}
style={[style, lineHeightStyle, pal.link]}
dataSet={WORD_WRAP}
warnOnMismatchingLabel
/>,