about summary refs log tree commit diff
path: root/src/components/PostControls
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-06-16 18:32:51 +0300
committerGitHub <noreply@github.com>2025-06-16 08:32:51 -0700
commit585dbebb693ac5799ee6cbedd918cf8fae01254d (patch)
tree4438b2e195361bec065e5640574e9628120ba5b6 /src/components/PostControls
parent5c50e102055ec7bfbed08a970b4388ae95d4963a (diff)
downloadvoidsky-585dbebb693ac5799ee6cbedd918cf8fae01254d.tar.zst
Fix long-press loophole for disabled quote posts (#8502)
* fix loophole for disabled quote posts

* show dialog instead
Diffstat (limited to 'src/components/PostControls')
-rw-r--r--src/components/PostControls/RepostButton.tsx15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/components/PostControls/RepostButton.tsx b/src/components/PostControls/RepostButton.tsx
index db63a7383..31438c6bd 100644
--- a/src/components/PostControls/RepostButton.tsx
+++ b/src/components/PostControls/RepostButton.tsx
@@ -40,6 +40,17 @@ let RepostButton = ({
   const requireAuth = useRequireAuth()
   const dialogControl = Dialog.useDialogControl()
 
+  const onPress = () => requireAuth(() => dialogControl.open())
+
+  const onLongPress = () =>
+    requireAuth(() => {
+      if (embeddingDisabled) {
+        dialogControl.open()
+      } else {
+        onQuote()
+      }
+    })
+
   return (
     <>
       <PostControlButton
@@ -47,8 +58,8 @@ let RepostButton = ({
         active={isReposted}
         activeColor={t.palette.positive_600}
         big={big}
-        onPress={() => requireAuth(() => dialogControl.open())}
-        onLongPress={() => requireAuth(() => onQuote())}
+        onPress={onPress}
+        onLongPress={onLongPress}
         label={
           isReposted
             ? _(