diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-06-11 00:43:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-10 16:43:04 -0700 |
commit | 4e9a65200e2f355b020415a3a18ae1ade404635f (patch) | |
tree | f6be02b3ccac590dcc0562bc9805047b853b52a6 /src | |
parent | 86e81650d3e9dec1179f30a3ca321e6a34144591 (diff) | |
download | voidsky-4e9a65200e2f355b020415a3a18ae1ade404635f.tar.zst |
add hitslop to repost button (#4469)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/util/post-ctrls/RepostButton.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/view/com/util/post-ctrls/RepostButton.tsx b/src/view/com/util/post-ctrls/RepostButton.tsx index 810508447..81e89d42d 100644 --- a/src/view/com/util/post-ctrls/RepostButton.tsx +++ b/src/view/com/util/post-ctrls/RepostButton.tsx @@ -3,6 +3,7 @@ import {View} from 'react-native' import {msg, plural} from '@lingui/macro' import {useLingui} from '@lingui/react' +import {HITSLOP_10, HITSLOP_20} from '#/lib/constants' import {useHaptics} from '#/lib/haptics' import {useRequireAuth} from '#/state/session' import {atoms as a, useTheme} from '#/alf' @@ -64,7 +65,8 @@ let RepostButton = ({ } (${plural(repostCount || 0, {one: '# repost', other: '# reposts'})})`} shape="round" variant="ghost" - color="secondary"> + color="secondary" + hitSlop={big ? HITSLOP_20 : HITSLOP_10}> <Repost style={color} width={big ? 22 : 18} /> {typeof repostCount !== 'undefined' && repostCount > 0 ? ( <Text |