From 9e9a4024c361dc9bb0f72d6ed8e4357c5820cb92 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 10 Jun 2026 19:44:28 +0300 Subject: [PATCH] [Chat] Delete `GroupChatGate` (#10846) --- src/screens/Messages/Conversation.tsx | 81 +-------------------------- 1 file changed, 2 insertions(+), 79 deletions(-) diff --git a/src/screens/Messages/Conversation.tsx b/src/screens/Messages/Conversation.tsx index 36adb63e7a..1e2f4037a8 100644 --- a/src/screens/Messages/Conversation.tsx +++ b/src/screens/Messages/Conversation.tsx @@ -1,4 +1,4 @@ -import {useCallback, useEffect, useMemo, useRef, useState} from 'react' +import {useCallback, useEffect, useMemo, useState} from 'react' import {type LayoutChangeEvent, View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {ChatBskyConvoDefs, moderateProfile} from '@atproto/api' @@ -35,7 +35,6 @@ import {MessagesList} from '#/screens/Messages/components/MessagesList' import {atoms as a, web} from '#/alf' import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen' import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy' -import * as Dialog from '#/components/Dialog' import { EmailDialogScreenID, useEmailDialogControl, @@ -45,10 +44,7 @@ import {MessagesListHeader} from '#/components/dms/MessagesListHeader' import {type ConvoWithDetails, parseConvoView} from '#/components/dms/util' import {Error} from '#/components/Error' import * as Layout from '#/components/Layout' -import * as Prompt from '#/components/Prompt' -import {Text} from '#/components/Typography' -import {useAnalytics} from '#/analytics' -import {IS_INTERNAL, IS_LIQUID_GLASS} from '#/env' +import {IS_LIQUID_GLASS} from '#/env' import {ChatDisabled} from './components/ChatDisabled' import {ChatEnded} from './components/ChatEnded' import {ChatLocked} from './components/ChatLocked' @@ -299,79 +295,6 @@ function InnerReady({ footer={footer} /> )} - - {!IS_INTERNAL && convo?.kind === 'group' && } ) } - -function GroupChatGate() { - const {t: l} = useLingui() - const ax = useAnalytics() - const navigation = useNavigation() - - const groupChatGateDialogControl = Dialog.useDialogControl() - - const isGatedGroupChat = !ax.features.enabled(ax.features.GroupChatsEnable) - - useEffect(() => { - if (isGatedGroupChat) { - setTimeout(() => groupChatGateDialogControl.open()) - } - }, [isGatedGroupChat, groupChatGateDialogControl]) - - const hasBeenReleased = ax.features.enabled( - ax.features.GroupChatsHasBeenReleased, - ) - - const isAlreadyGoingBackRef = useRef(false) - const onGoBack = () => { - if (isAlreadyGoingBackRef.current) return - isAlreadyGoingBackRef.current = true - if (navigation.canGoBack()) { - navigation.goBack() - } else { - navigation.replace('Messages', {animation: 'pop'}) - } - } - - return ( - - - - - 🐴 - - - - {hasBeenReleased ? ( - Group chats are now available - ) : ( - Group chats are not yet available - )} - - - {hasBeenReleased ? ( - Update your app to the latest version to join in! - ) : ( - - Hold your horses! This feature isn't available to you yet. Please - check back later. - - )} - - - - - - - ) -}