From 2eff09410255ab531508a5f28561a59351732cee Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 10 Mar 2026 13:15:05 -0500 Subject: [PATCH] Remove extra file --- src/components/BotBadge.tsx | 11 ++++++++++- src/components/ProfileBadges.tsx | 3 +-- src/lib/bots.ts | 10 ---------- src/screens/Settings/AccountSettings.tsx | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) delete mode 100644 src/lib/bots.ts diff --git a/src/components/BotBadge.tsx b/src/components/BotBadge.tsx index 0cbaedeaa1..da72597351 100644 --- a/src/components/BotBadge.tsx +++ b/src/components/BotBadge.tsx @@ -1,8 +1,8 @@ import {View} from 'react-native' +import {type ComAtprotoLabelDefs} from '@atproto/api' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' -import {isBotAccount} from '#/lib/bots' import {atoms as a, useTheme} from '#/alf' import {BotAccountAlert} from '#/components/BotAccountAlert' import {Button} from '#/components/Button' @@ -11,6 +11,15 @@ import {Bot_Filled as RobotIcon} from '#/components/icons/Bot' import {useAnalytics} from '#/analytics' import type * as bsky from '#/types/bsky' +export function isBotAccount(profile: { + did: string + labels?: ComAtprotoLabelDefs.Label[] +}): boolean { + return ( + profile.labels?.some(l => l.val === 'bot' && l.src === profile.did) ?? false + ) +} + export function BotBadge({ profile, alwaysShow = false, diff --git a/src/components/ProfileBadges.tsx b/src/components/ProfileBadges.tsx index 042757c8d4..dd0cedfe8f 100644 --- a/src/components/ProfileBadges.tsx +++ b/src/components/ProfileBadges.tsx @@ -1,9 +1,8 @@ import {View} from 'react-native' -import {isBotAccount} from '#/lib/bots' import {useProfileShadow} from '#/state/cache/profile-shadow' import {atoms as a, type ViewStyleProp} from '#/alf' -import {BotBadge, BotBadgeButton} from '#/components/BotBadge' +import {BotBadge, BotBadgeButton, isBotAccount} from '#/components/BotBadge' import {useSimpleVerificationState} from '#/components/verification' import {VerificationCheck} from '#/components/verification/VerificationCheck' import {VerificationCheckButton} from '#/components/verification/VerificationCheckButton' diff --git a/src/lib/bots.ts b/src/lib/bots.ts deleted file mode 100644 index 0f9a24baae..0000000000 --- a/src/lib/bots.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {type ComAtprotoLabelDefs} from '@atproto/api' - -export function isBotAccount(profile: { - did: string - labels?: ComAtprotoLabelDefs.Label[] -}): boolean { - return ( - profile.labels?.some(l => l.val === 'bot' && l.src === profile.did) ?? false - ) -} diff --git a/src/screens/Settings/AccountSettings.tsx b/src/screens/Settings/AccountSettings.tsx index 9be6654347..ed72c78a9f 100644 --- a/src/screens/Settings/AccountSettings.tsx +++ b/src/screens/Settings/AccountSettings.tsx @@ -3,13 +3,13 @@ import {useLingui} from '@lingui/react' import {Trans} from '@lingui/react/macro' import {type NativeStackScreenProps} from '@react-navigation/native-stack' -import {isBotAccount} from '#/lib/bots' import {type CommonNavigatorParams} from '#/lib/routes/types' import {useProfileQuery} from '#/state/queries/profile' import {useSession} from '#/state/session' import * as SettingsList from '#/screens/Settings/components/SettingsList' import {atoms as a, useTheme} from '#/alf' import {AgeAssuranceAccountCard} from '#/components/ageAssurance/AgeAssuranceAccountCard' +import {isBotAccount} from '#/components/BotBadge' import {useDialogControl} from '#/components/Dialog' import {BirthDateSettingsDialog} from '#/components/dialogs/BirthDateSettings' import {