Remove content visibility + SP search feature flags (#11675)
Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
@@ -19,10 +19,8 @@ export enum Features {
|
|||||||
PostFeedKnownLikersEnable = 'post_feed:known_likers:enable',
|
PostFeedKnownLikersEnable = 'post_feed:known_likers:enable',
|
||||||
PostThreadKnownLikersEnable = 'post_thread:known_likers:enable',
|
PostThreadKnownLikersEnable = 'post_thread:known_likers:enable',
|
||||||
CustomLogoJapanEnable = 'custom_logo:japan:enable',
|
CustomLogoJapanEnable = 'custom_logo:japan:enable',
|
||||||
SearchStarterPacksV2Enable = 'search_starter_packs_v2:enable',
|
|
||||||
FollowSortEnable = 'follow_sort:enable',
|
FollowSortEnable = 'follow_sort:enable',
|
||||||
OnboardingInterestsRequiredEnable = 'onboarding:interests:required:enable',
|
OnboardingInterestsRequiredEnable = 'onboarding:interests:required:enable',
|
||||||
ContentVisibilitySettingsEnable = 'content_visibility_settings:enable',
|
|
||||||
ModerationInboxEnable = 'moderation_inbox:enable',
|
ModerationInboxEnable = 'moderation_inbox:enable',
|
||||||
|
|
||||||
// values
|
// values
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ let SearchResults = ({
|
|||||||
onPageSelected: (page: number) => void
|
onPageSelected: (page: number) => void
|
||||||
headerHeight: number
|
headerHeight: number
|
||||||
}): React.ReactNode => {
|
}): React.ReactNode => {
|
||||||
const ax = useAnalytics()
|
|
||||||
const {t: l} = useLingui()
|
const {t: l} = useLingui()
|
||||||
/*
|
/*
|
||||||
* People/Feeds visibility keys off post-only filters: a `lang` filter applies
|
* People/Feeds visibility keys off post-only filters: a `lang` filter applies
|
||||||
@@ -67,10 +66,6 @@ let SearchResults = ({
|
|||||||
const activePage = hasPostFilters && activeTab > 1 ? 0 : activeTab
|
const activePage = hasPostFilters && activeTab > 1 ? 0 : activeTab
|
||||||
const tabShape = hasPostFilters ? 'filtered' : 'plain'
|
const tabShape = hasPostFilters ? 'filtered' : 'plain'
|
||||||
|
|
||||||
const isStarterPacksEnabled = ax.features.enabled(
|
|
||||||
ax.features.SearchStarterPacksV2Enable,
|
|
||||||
)
|
|
||||||
|
|
||||||
const sections = useMemo(() => {
|
const sections = useMemo(() => {
|
||||||
if (!query && !hasFilters) return []
|
if (!query && !hasFilters) return []
|
||||||
/*
|
/*
|
||||||
@@ -115,29 +110,20 @@ let SearchResults = ({
|
|||||||
<SearchScreenFeedsResults query={query} active={activePage === 3} />
|
<SearchScreenFeedsResults query={query} active={activePage === 3} />
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
noFilters &&
|
noFilters && {
|
||||||
isStarterPacksEnabled && {
|
title: l`Starter Packs`,
|
||||||
title: l`Starter Packs`,
|
component: (
|
||||||
component: (
|
<SearchScreenStarterPackResults
|
||||||
<SearchScreenStarterPackResults
|
query={query}
|
||||||
query={query}
|
active={activePage === 4}
|
||||||
active={activePage === 4}
|
/>
|
||||||
/>
|
),
|
||||||
),
|
},
|
||||||
},
|
|
||||||
].filter(Boolean) as {
|
].filter(Boolean) as {
|
||||||
title: string
|
title: string
|
||||||
component: React.ReactNode
|
component: React.ReactNode
|
||||||
}[]
|
}[]
|
||||||
}, [
|
}, [l, query, filters, hasFilters, hasPostFilters, activePage])
|
||||||
l,
|
|
||||||
query,
|
|
||||||
filters,
|
|
||||||
hasFilters,
|
|
||||||
hasPostFilters,
|
|
||||||
activePage,
|
|
||||||
isStarterPacksEnabled,
|
|
||||||
])
|
|
||||||
|
|
||||||
// There may be fewer tabs after changing the search options.
|
// There may be fewer tabs after changing the search options.
|
||||||
const selectedPage = activePage > sections.length - 1 ? 0 : activePage
|
const selectedPage = activePage > sections.length - 1 ? 0 : activePage
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import {MagnifyingGlass_Stroke2_Corner0_Rounded as MagnifyingGlassIcon} from '#/
|
|||||||
import {ShieldCheck_Stroke2_Corner0_Rounded as ShieldIcon} from '#/components/icons/Shield'
|
import {ShieldCheck_Stroke2_Corner0_Rounded as ShieldIcon} from '#/components/icons/Shield'
|
||||||
import * as Layout from '#/components/Layout'
|
import * as Layout from '#/components/Layout'
|
||||||
import {InlineLinkText} from '#/components/Link'
|
import {InlineLinkText} from '#/components/Link'
|
||||||
import {useAnalytics} from '#/analytics'
|
|
||||||
import {type app} from '#/lexicons'
|
import {type app} from '#/lexicons'
|
||||||
import {AlgoVisibilityOptOut} from './components/AlgoVisibilityOptOut'
|
import {AlgoVisibilityOptOut} from './components/AlgoVisibilityOptOut'
|
||||||
import {Email2FAToggle} from './components/Email2FAToggle'
|
import {Email2FAToggle} from './components/Email2FAToggle'
|
||||||
@@ -31,10 +30,6 @@ type Props = NativeStackScreenProps<
|
|||||||
export function PrivacyAndSecuritySettingsScreen({}: Props) {
|
export function PrivacyAndSecuritySettingsScreen({}: Props) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const ax = useAnalytics()
|
|
||||||
const isContentVisibilityEnabled = ax.features.enabled(
|
|
||||||
ax.features.ContentVisibilitySettingsEnable,
|
|
||||||
)
|
|
||||||
const {data: appPasswords} = useAppPasswordsQuery()
|
const {data: appPasswords} = useAppPasswordsQuery()
|
||||||
const {currentAccount} = useSession()
|
const {currentAccount} = useSession()
|
||||||
const {
|
const {
|
||||||
@@ -108,12 +103,10 @@ export function PrivacyAndSecuritySettingsScreen({}: Props) {
|
|||||||
/>
|
/>
|
||||||
</SettingsList.LinkItem>
|
</SettingsList.LinkItem>
|
||||||
<SettingsList.Divider />
|
<SettingsList.Divider />
|
||||||
{isContentVisibilityEnabled && (
|
<SettingsList.Item style={[a.align_start]}>
|
||||||
<SettingsList.Item style={[a.align_start]}>
|
<SettingsList.ItemIcon icon={MagnifyingGlassIcon} />
|
||||||
<SettingsList.ItemIcon icon={MagnifyingGlassIcon} />
|
<AlgoVisibilityOptOut />
|
||||||
<AlgoVisibilityOptOut />
|
</SettingsList.Item>
|
||||||
</SettingsList.Item>
|
|
||||||
)}
|
|
||||||
<SettingsList.Item style={[a.align_start]}>
|
<SettingsList.Item style={[a.align_start]}>
|
||||||
<SettingsList.ItemIcon icon={EyeSlashIcon} />
|
<SettingsList.ItemIcon icon={EyeSlashIcon} />
|
||||||
<PwiOptOut />
|
<PwiOptOut />
|
||||||
|
|||||||
Reference in New Issue
Block a user