From df20ae237eaf434c6ed0fd032f8328cd9b8c352c Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Tue, 26 Aug 2025 09:54:19 -0500
Subject: Threads v2 cleanup (#8902)

* Delete root PostThread component

* Remove PostThreadItem, migrate DebugMod to use new components

* Remove other unused components

* Move PostThreadFollowBtn to new home

* Move PostThreadComposePrompt to new home

* Remove gate

* Keep naming in DebugMod

* rm v1 prefs

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
---
 .../com/post-thread/PostThreadComposePrompt.tsx    | 95 ----------------------
 1 file changed, 95 deletions(-)
 delete mode 100644 src/view/com/post-thread/PostThreadComposePrompt.tsx

(limited to 'src/view/com/post-thread/PostThreadComposePrompt.tsx')

diff --git a/src/view/com/post-thread/PostThreadComposePrompt.tsx b/src/view/com/post-thread/PostThreadComposePrompt.tsx
deleted file mode 100644
index dc0561725..000000000
--- a/src/view/com/post-thread/PostThreadComposePrompt.tsx
+++ /dev/null
@@ -1,95 +0,0 @@
-import {type StyleProp, View, type ViewStyle} from 'react-native'
-import {LinearGradient} from 'expo-linear-gradient'
-import {msg, Trans} from '@lingui/macro'
-import {useLingui} from '@lingui/react'
-
-import {PressableScale} from '#/lib/custom-animations/PressableScale'
-import {useHaptics} from '#/lib/haptics'
-import {useHideBottomBarBorderForScreen} from '#/lib/hooks/useHideBottomBarBorder'
-import {useProfileQuery} from '#/state/queries/profile'
-import {useSession} from '#/state/session'
-import {UserAvatar} from '#/view/com/util/UserAvatar'
-import {atoms as a, ios, native, useBreakpoints, useTheme} from '#/alf'
-import {transparentifyColor} from '#/alf/util/colorGeneration'
-import {useInteractionState} from '#/components/hooks/useInteractionState'
-import {Text} from '#/components/Typography'
-
-export function PostThreadComposePrompt({
-  onPressCompose,
-  style,
-}: {
-  onPressCompose: () => void
-  style?: StyleProp<ViewStyle>
-}) {
-  const {currentAccount} = useSession()
-  const {data: profile} = useProfileQuery({did: currentAccount?.did})
-  const {_} = useLingui()
-  const {gtMobile} = useBreakpoints()
-  const t = useTheme()
-  const playHaptic = useHaptics()
-  const {
-    state: hovered,
-    onIn: onHoverIn,
-    onOut: onHoverOut,
-  } = useInteractionState()
-
-  useHideBottomBarBorderForScreen()
-
-  return (
-    <View
-      style={[
-        a.px_sm,
-        gtMobile
-          ? [a.py_xs, a.border_t, t.atoms.border_contrast_low, t.atoms.bg]
-          : [a.pb_2xs],
-        style,
-      ]}>
-      {!gtMobile && (
-        <LinearGradient
-          key={t.name} // android does not update when you change the colors. sigh.
-          start={[0.5, 0]}
-          end={[0.5, 1]}
-          colors={[
-            transparentifyColor(t.atoms.bg.backgroundColor, 0),
-            t.atoms.bg.backgroundColor,
-          ]}
-          locations={[0.15, 0.4]}
-          style={[a.absolute, a.inset_0]}
-        />
-      )}
-      <PressableScale
-        accessibilityRole="button"
-        accessibilityLabel={_(msg`Compose reply`)}
-        accessibilityHint={_(msg`Opens composer`)}
-        onPress={() => {
-          onPressCompose()
-          playHaptic('Light')
-        }}
-        onLongPress={ios(() => {
-          onPressCompose()
-          playHaptic('Heavy')
-        })}
-        onHoverIn={onHoverIn}
-        onHoverOut={onHoverOut}
-        style={[
-          a.flex_row,
-          a.align_center,
-          a.p_sm,
-          a.gap_sm,
-          a.rounded_full,
-          (!gtMobile || hovered) && t.atoms.bg_contrast_25,
-          native([a.border, t.atoms.border_contrast_low]),
-          a.transition_color,
-        ]}>
-        <UserAvatar
-          size={24}
-          avatar={profile?.avatar}
-          type={profile?.associated?.labeler ? 'labeler' : 'user'}
-        />
-        <Text style={[a.text_md, t.atoms.text_contrast_medium]}>
-          <Trans>Write your reply</Trans>
-        </Text>
-      </PressableScale>
-    </View>
-  )
-}
-- 
cgit 1.4.1

