remove DMs gate (#4112)
This commit is contained in:
parent
a7b0242cc8
commit
4a7436886d
9 changed files with 41 additions and 152 deletions
|
@ -7,7 +7,6 @@ import {useFocusEffect} from '@react-navigation/native'
|
|||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||
|
||||
import {CommonNavigatorParams} from '#/lib/routes/types'
|
||||
import {useGate} from '#/lib/statsig/statsig'
|
||||
import {useCurrentConvoId} from '#/state/messages/current-convo-id'
|
||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||
import {useProfileQuery} from '#/state/queries/profile'
|
||||
|
@ -23,14 +22,12 @@ import {MessagesListBlockedFooter} from '#/components/dms/MessagesListBlockedFoo
|
|||
import {MessagesListHeader} from '#/components/dms/MessagesListHeader'
|
||||
import {Error} from '#/components/Error'
|
||||
import {Loader} from '#/components/Loader'
|
||||
import {ClipClopGate} from '../gate'
|
||||
|
||||
type Props = NativeStackScreenProps<
|
||||
CommonNavigatorParams,
|
||||
'MessagesConversation'
|
||||
>
|
||||
export function MessagesConversationScreen({route}: Props) {
|
||||
const gate = useGate()
|
||||
const {gtMobile} = useBreakpoints()
|
||||
const setMinimalShellMode = useSetMinimalShellMode()
|
||||
|
||||
|
@ -54,8 +51,6 @@ export function MessagesConversationScreen({route}: Props) {
|
|||
}, [gtMobile, convoId, setCurrentConvoId, setMinimalShellMode]),
|
||||
)
|
||||
|
||||
if (!gate('dms')) return <ClipClopGate />
|
||||
|
||||
return (
|
||||
<ConvoProvider convoId={convoId}>
|
||||
<Inner />
|
||||
|
|
|
@ -7,7 +7,6 @@ import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
|||
|
||||
import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender'
|
||||
import {MessagesTabNavigatorParams} from '#/lib/routes/types'
|
||||
import {useGate} from '#/lib/statsig/statsig'
|
||||
import {cleanError} from '#/lib/strings/errors'
|
||||
import {logger} from '#/logger'
|
||||
import {useListConvos} from '#/state/queries/messages/list-converations'
|
||||
|
@ -29,7 +28,6 @@ import {Link} from '#/components/Link'
|
|||
import {ListFooter} from '#/components/Lists'
|
||||
import {Loader} from '#/components/Loader'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {ClipClopGate} from '../gate'
|
||||
import {ChatListItem} from './ChatListItem'
|
||||
|
||||
type Props = NativeStackScreenProps<MessagesTabNavigatorParams, 'Messages'>
|
||||
|
@ -129,9 +127,6 @@ export function MessagesScreen({navigation, route}: Props) {
|
|||
navigation.navigate('MessagesSettings')
|
||||
}, [navigation])
|
||||
|
||||
const gate = useGate()
|
||||
if (!gate('dms')) return <ClipClopGate />
|
||||
|
||||
if (conversations.length < 1) {
|
||||
return (
|
||||
<View style={a.flex_1}>
|
||||
|
|
|
@ -5,7 +5,6 @@ import {useLingui} from '@lingui/react'
|
|||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||
|
||||
import {CommonNavigatorParams} from '#/lib/routes/types'
|
||||
import {useGate} from '#/lib/statsig/statsig'
|
||||
import {isNative} from '#/platform/detection'
|
||||
import {useUpdateActorDeclaration} from '#/state/queries/messages/actor-declaration'
|
||||
import {useProfileQuery} from '#/state/queries/profile'
|
||||
|
@ -18,7 +17,6 @@ import {Divider} from '#/components/Divider'
|
|||
import * as Toggle from '#/components/forms/Toggle'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {useBackgroundNotificationPreferences} from '../../../modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider'
|
||||
import {ClipClopGate} from './gate'
|
||||
|
||||
type AllowIncoming = 'all' | 'none' | 'following'
|
||||
|
||||
|
@ -46,9 +44,6 @@ export function MessagesSettingsScreen({}: Props) {
|
|||
[updateDeclaration],
|
||||
)
|
||||
|
||||
const gate = useGate()
|
||||
if (!gate('dms')) return <ClipClopGate />
|
||||
|
||||
return (
|
||||
<CenteredView sideBorders style={a.h_full_vh}>
|
||||
<ViewHeader title={_(msg`Settings`)} showOnDesktop showBorder />
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
import React from 'react'
|
||||
import {Text, View} from 'react-native'
|
||||
|
||||
export function ClipClopGate() {
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
gap: 20,
|
||||
}}>
|
||||
<Text style={{fontSize: 50}}>🐴</Text>
|
||||
<Text style={{textAlign: 'center'}}>Nice try</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue