diff --git a/src/components/dms/ChatEmptyPill.tsx b/src/components/dms/ChatEmptyPill.tsx deleted file mode 100644 index 17dcf8c561..0000000000 --- a/src/components/dms/ChatEmptyPill.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import {useCallback, useMemo, useState} from 'react' -import {Pressable, View} from 'react-native' -import Animated, { - runOnJS, - useAnimatedStyle, - useSharedValue, - withTiming, -} from 'react-native-reanimated' -import {msg} from '@lingui/core/macro' -import {useLingui} from '@lingui/react' - -import {ScaleAndFadeIn} from '#/lib/custom-animations/ScaleAndFade' -import {ShrinkAndPop} from '#/lib/custom-animations/ShrinkAndPop' -import {useHaptics} from '#/lib/haptics' -import {atoms as a, useTheme} from '#/alf' -import {Text} from '#/components/Typography' -import {IS_WEB} from '#/env' - -const AnimatedPressable = Animated.createAnimatedComponent(Pressable) - -let lastIndex = 0 - -export function ChatEmptyPill() { - const t = useTheme() - const {_} = useLingui() - const playHaptic = useHaptics() - const [promptIndex, setPromptIndex] = useState(lastIndex) - - const scale = useSharedValue(1) - - const prompts = useMemo(() => { - return [ - _(msg`Say hello!`), - _(msg`Share your favorite feed!`), - _(msg`Tell a joke!`), - _(msg`Share a fun fact!`), - _(msg`Share a cool story!`), - _(msg`Send a neat website!`), - _(msg`Clip 🐴 clop 🐴`), - ] - }, [_]) - - const onPressIn = useCallback(() => { - if (IS_WEB) return - scale.set(() => withTiming(1.075, {duration: 100})) - }, [scale]) - - const onPressOut = useCallback(() => { - if (IS_WEB) return - scale.set(() => withTiming(1, {duration: 100})) - }, [scale]) - - const onPress = useCallback(() => { - runOnJS(playHaptic)() - let randomPromptIndex = Math.floor(Math.random() * prompts.length) - while (randomPromptIndex === lastIndex) { - randomPromptIndex = Math.floor(Math.random() * prompts.length) - } - setPromptIndex(randomPromptIndex) - lastIndex = randomPromptIndex - }, [playHaptic, prompts.length]) - - const animatedStyle = useAnimatedStyle(() => ({ - transform: [{scale: scale.get()}], - })) - - return ( - - - - {prompts[promptIndex]} - - - - ) -} diff --git a/src/screens/Messages/components/MessagesList.tsx b/src/screens/Messages/components/MessagesList.tsx index 69182c082b..81b2331f06 100644 --- a/src/screens/Messages/components/MessagesList.tsx +++ b/src/screens/Messages/components/MessagesList.tsx @@ -52,7 +52,6 @@ import {MessageComposer} from '#/screens/Messages/components/MessageComposer' import {MessageInput} from '#/screens/Messages/components/MessageInput' import {MessageListError} from '#/screens/Messages/components/MessageListError' import {atoms as a, platform, tokens, useTheme, web} from '#/alf' -import {ChatEmptyPill} from '#/components/dms/ChatEmptyPill' import {DateDivider} from '#/components/dms/DateDivider' import {MessageItem} from '#/components/dms/MessageItem' import {NewMessagesPill} from '#/components/dms/NewMessagesPill' @@ -666,12 +665,8 @@ function ConversationFooter({ case 'loading': return null case 'new-chat': - return ( - <> - - {children} - - ) + // new chat pill goes here - removed for now + return children case 'request': return case 'standard':