Fix long-press loophole for disabled quote posts (#8502)
* fix loophole for disabled quote posts * show dialog instead
This commit is contained in:
@@ -40,6 +40,17 @@ let RepostButton = ({
|
|||||||
const requireAuth = useRequireAuth()
|
const requireAuth = useRequireAuth()
|
||||||
const dialogControl = Dialog.useDialogControl()
|
const dialogControl = Dialog.useDialogControl()
|
||||||
|
|
||||||
|
const onPress = () => requireAuth(() => dialogControl.open())
|
||||||
|
|
||||||
|
const onLongPress = () =>
|
||||||
|
requireAuth(() => {
|
||||||
|
if (embeddingDisabled) {
|
||||||
|
dialogControl.open()
|
||||||
|
} else {
|
||||||
|
onQuote()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PostControlButton
|
<PostControlButton
|
||||||
@@ -47,8 +58,8 @@ let RepostButton = ({
|
|||||||
active={isReposted}
|
active={isReposted}
|
||||||
activeColor={t.palette.positive_600}
|
activeColor={t.palette.positive_600}
|
||||||
big={big}
|
big={big}
|
||||||
onPress={() => requireAuth(() => dialogControl.open())}
|
onPress={onPress}
|
||||||
onLongPress={() => requireAuth(() => onQuote())}
|
onLongPress={onLongPress}
|
||||||
label={
|
label={
|
||||||
isReposted
|
isReposted
|
||||||
? _(
|
? _(
|
||||||
|
|||||||
Reference in New Issue
Block a user