Add test-environment mod authority
This commit is contained in:
@@ -21,10 +21,10 @@ import {ScrollView} from '#/view/com/util/Views'
|
||||
|
||||
import {
|
||||
UsePreferencesQueryResponse,
|
||||
useMyLabelers,
|
||||
usePreferencesQuery,
|
||||
usePreferencesSetAdultContentMutation,
|
||||
} from '#/state/queries/preferences'
|
||||
import {useLabelersDetailedInfoQuery} from '#/state/queries/labeler'
|
||||
|
||||
import {logger} from '#/logger'
|
||||
import {useTheme, atoms as a, useBreakpoints} from '#/alf'
|
||||
@@ -86,16 +86,11 @@ export function ModerationScreen(
|
||||
error: preferencesError,
|
||||
data: preferences,
|
||||
} = usePreferencesQuery()
|
||||
const labelerDids = preferences
|
||||
? preferences.moderationPrefs.labelers.map(l => l.did)
|
||||
: []
|
||||
const {
|
||||
isLoading: isLabelersLoading,
|
||||
data: labelers,
|
||||
error: labelersError,
|
||||
} = useLabelersDetailedInfoQuery({
|
||||
dids: labelerDids,
|
||||
})
|
||||
} = useMyLabelers()
|
||||
const {gtMobile} = useBreakpoints()
|
||||
const {height} = useSafeAreaFrame()
|
||||
|
||||
@@ -411,36 +406,10 @@ export function ModerationScreenInner({
|
||||
<Trans>Advanced</Trans>
|
||||
</Text>
|
||||
<View style={[a.rounded_sm, t.atoms.bg_contrast_25]}>
|
||||
<ModerationServiceCard.Link
|
||||
labeler={{
|
||||
uri: '',
|
||||
cid: '',
|
||||
policies: {
|
||||
labelValues: [],
|
||||
},
|
||||
creator: {
|
||||
did: '',
|
||||
handle: 'safety.bsky.app',
|
||||
displayName: 'Bluesky Safety',
|
||||
},
|
||||
indexedAt: new Date().toISOString(),
|
||||
}}>
|
||||
<ModerationServiceCard.Card.Outer>
|
||||
<ModerationServiceCard.Card.Avatar avatar={undefined} />
|
||||
<ModerationServiceCard.Card.Content
|
||||
title={getModerationServiceTitle({
|
||||
displayName: 'Bluesky Safety',
|
||||
handle: 'safety.bsky.app',
|
||||
})}
|
||||
handle={'safety.bsky.app'}
|
||||
description={'Official moderation team'}
|
||||
/>
|
||||
</ModerationServiceCard.Card.Outer>
|
||||
</ModerationServiceCard.Link>
|
||||
{labelers.map(mod => {
|
||||
{labelers.map((mod, i) => {
|
||||
return (
|
||||
<React.Fragment key={mod.creator.did}>
|
||||
<Divider />
|
||||
{i !== 0 && <Divider />}
|
||||
<ModerationServiceCard.Link labeler={mod}>
|
||||
<ModerationServiceCard.Card.Outer>
|
||||
<ModerationServiceCard.Card.Avatar
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
import {FeedCard} from '#/screens/Onboarding/StepAlgoFeeds/FeedCard'
|
||||
import {aggregateInterestItems} from '#/screens/Onboarding/util'
|
||||
import {IconCircle} from '#/components/IconCircle'
|
||||
import {IS_PROD_SERVICE} from 'lib/constants'
|
||||
import {IS_TEST_USER} from 'lib/constants'
|
||||
import {useSession} from 'state/session'
|
||||
|
||||
export function StepTopicalFeeds() {
|
||||
@@ -32,14 +32,14 @@ export function StepTopicalFeeds() {
|
||||
const [selectedFeedUris, setSelectedFeedUris] = React.useState<string[]>([])
|
||||
const [saving, setSaving] = React.useState(false)
|
||||
const suggestedFeedUris = React.useMemo(() => {
|
||||
if (!IS_PROD_SERVICE(currentAccount?.service)) return []
|
||||
if (IS_TEST_USER(currentAccount?.handle)) return []
|
||||
return aggregateInterestItems(
|
||||
state.interestsStepResults.selectedInterests,
|
||||
state.interestsStepResults.apiResponse.suggestedFeedUris,
|
||||
state.interestsStepResults.apiResponse.suggestedFeedUris.default || [],
|
||||
).slice(0, 10)
|
||||
}, [
|
||||
currentAccount?.service,
|
||||
currentAccount?.handle,
|
||||
state.interestsStepResults.apiResponse.suggestedFeedUris,
|
||||
state.interestsStepResults.selectedInterests,
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user