From 585dbebb693ac5799ee6cbedd918cf8fae01254d Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Mon, 16 Jun 2025 18:32:51 +0300
Subject: Fix long-press loophole for disabled quote posts (#8502)

* fix loophole for disabled quote posts

* show dialog instead
---
 src/components/PostControls/RepostButton.tsx | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

(limited to 'src/components/PostControls/RepostButton.tsx')

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
             ? _(
-- 
cgit 1.4.1

