diff options
Diffstat (limited to 'src')
49 files changed, 329 insertions, 292 deletions
diff --git a/src/components/ContextMenu/index.tsx b/src/components/ContextMenu/index.tsx index 4a0814dfe..dd7be13d0 100644 --- a/src/components/ContextMenu/index.tsx +++ b/src/components/ContextMenu/index.tsx @@ -190,7 +190,7 @@ export function Root({children}: {children: React.ReactNode}) { if (item) playHaptic('Light') setHoveredMenuItem(item) }, - } satisfies ContextType), + }) satisfies ContextType, [ measurement, setMeasurement, @@ -710,8 +710,8 @@ export function Item({ const xOffset = position ? position.x : align === 'left' - ? measurement.x - : measurement.x + measurement.width - layout.width + ? measurement.x + : measurement.x + measurement.width - layout.width registerHoverable( id, diff --git a/src/components/Link.tsx b/src/components/Link.tsx index 28cd19418..127b2edfb 100644 --- a/src/components/Link.tsx +++ b/src/components/Link.tsx @@ -99,10 +99,10 @@ export function useLink({ return typeof to === 'string' ? convertBskyAppUrlIfNeeded(sanitizeUrl(to)) : to.screen - ? router.matchName(to.screen)?.build(to.params) - : to.href - ? convertBskyAppUrlIfNeeded(sanitizeUrl(to.href)) - : undefined + ? router.matchName(to.screen)?.build(to.params) + : to.href + ? convertBskyAppUrlIfNeeded(sanitizeUrl(to.href)) + : undefined }, [to]) if (!href) { diff --git a/src/components/Post/Embed/ImageEmbed.tsx b/src/components/Post/Embed/ImageEmbed.tsx index 030d237a0..4ed17230e 100644 --- a/src/components/Post/Embed/ImageEmbed.tsx +++ b/src/components/Post/Embed/ImageEmbed.tsx @@ -77,9 +77,9 @@ export function ImageEmbed({ rest.viewContext === PostEmbedViewContext.ThreadHighlighted ? 'none' : rest.viewContext === - PostEmbedViewContext.FeedEmbedRecordWithMedia - ? 'square' - : 'constrained' + PostEmbedViewContext.FeedEmbedRecordWithMedia + ? 'square' + : 'constrained' } image={image} onPress={(containerRef, dims) => onPress(0, [containerRef], [dims])} diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx index 6d14deafc..676b52661 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx @@ -317,8 +317,8 @@ export function Controls({ !focused ? msg`Unmute video` : playing - ? msg`Pause video` - : msg`Play video`, + ? msg`Pause video` + : msg`Play video`, )} accessibilityHint="" style={[ diff --git a/src/components/PostControls/PostMenu/PostMenuItems.tsx b/src/components/PostControls/PostMenu/PostMenuItems.tsx index 01ddd0bcf..f0ef9ed05 100644 --- a/src/components/PostControls/PostMenu/PostMenuItems.tsx +++ b/src/components/PostControls/PostMenu/PostMenuItems.tsx @@ -600,8 +600,8 @@ let PostMenuItems = ({ isDetachPending ? Loader : quoteEmbed.isDetached - ? Eye - : EyeSlash + ? Eye + : EyeSlash } position="right" /> diff --git a/src/components/Select/index.web.tsx b/src/components/Select/index.web.tsx index 0de74c562..a4d3fb80b 100644 --- a/src/components/Select/index.web.tsx +++ b/src/components/Select/index.web.tsx @@ -111,8 +111,8 @@ export function Trigger({children, label}: TriggerProps) { borderColor: focused ? t.palette.primary_500 : hovered - ? t.palette.contrast_100 - : t.palette.contrast_25, + ? t.palette.contrast_100 + : t.palette.contrast_25, }, ])}> {children} diff --git a/src/components/WhoCanReply.tsx b/src/components/WhoCanReply.tsx index 29f4ac5bc..22a514194 100644 --- a/src/components/WhoCanReply.tsx +++ b/src/components/WhoCanReply.tsx @@ -1,9 +1,15 @@ import React from 'react' -import {Keyboard, Platform, StyleProp, View, ViewStyle} from 'react-native' import { - AppBskyFeedDefs, + Keyboard, + Platform, + type StyleProp, + View, + type ViewStyle, +} from 'react-native' +import { + type AppBskyFeedDefs, AppBskyFeedPost, - AppBskyGraphDefs, + type AppBskyGraphDefs, AtUri, } from '@atproto/api' import {msg, Trans} from '@lingui/macro' @@ -13,7 +19,7 @@ import {HITSLOP_10} from '#/lib/constants' import {makeListLink, makeProfileLink} from '#/lib/routes/links' import {isNative} from '#/platform/detection' import { - ThreadgateAllowUISetting, + type ThreadgateAllowUISetting, threadgateViewToAllowUISetting, } from '#/state/queries/threadgate' import {atoms as a, useTheme} from '#/alf' @@ -70,8 +76,8 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) { const description = anyoneCanReply ? _(msg`Everybody can reply`) : noOneCanReply - ? _(msg`Replies disabled`) - : _(msg`Some people can reply`) + ? _(msg`Replies disabled`) + : _(msg`Some people can reply`) const onPressOpen = () => { if (isNative && Keyboard.isVisible()) { diff --git a/src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx b/src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx index 1896ff27d..2b0e86c61 100644 --- a/src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx +++ b/src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx @@ -185,8 +185,8 @@ export function Disable() { state.emailStatus === 'pending' ? Loader : state.emailStatus === 'success' - ? Check - : Envelope + ? Check + : Envelope } /> </Button> diff --git a/src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx b/src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx index 7a126792a..bf893701c 100644 --- a/src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx +++ b/src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx @@ -116,8 +116,8 @@ export function Enable() { state.status === 'pending' ? Loader : state.status === 'success' - ? Check - : ShieldIcon + ? Check + : ShieldIcon } /> </Button> diff --git a/src/components/dialogs/SearchablePeopleList.tsx b/src/components/dialogs/SearchablePeopleList.tsx index 81655be0f..159f623b9 100644 --- a/src/components/dialogs/SearchablePeopleList.tsx +++ b/src/components/dialogs/SearchablePeopleList.tsx @@ -390,8 +390,8 @@ function DefaultProfileCard({ !enabled ? {opacity: 0.5} : pressed || focused || hovered - ? t.atoms.bg_contrast_25 - : t.atoms.bg, + ? t.atoms.bg_contrast_25 + : t.atoms.bg, ]}> <ProfileCard.Header> <ProfileCard.Avatar diff --git a/src/components/dms/EmojiReactionPicker.tsx b/src/components/dms/EmojiReactionPicker.tsx index cdb1680e8..b83fd4454 100644 --- a/src/components/dms/EmojiReactionPicker.tsx +++ b/src/components/dms/EmojiReactionPicker.tsx @@ -98,8 +98,8 @@ export function EmojiReactionPicker({ : t.palette.primary_500, } : alreadyReacted - ? {backgroundColor: t.palette.primary_200} - : bgColor, + ? {backgroundColor: t.palette.primary_200} + : bgColor, {height: 40, width: 40}, a.justify_center, a.align_center, diff --git a/src/components/dms/MessageContextMenu.tsx b/src/components/dms/MessageContextMenu.tsx index a45ec7a07..d1771659d 100644 --- a/src/components/dms/MessageContextMenu.tsx +++ b/src/components/dms/MessageContextMenu.tsx @@ -128,8 +128,7 @@ export let MessageContextMenu = ({ label={_(msg`Message options`)} contentLabel={_( msg`Message from @${ - sender?.handle ?? // should always be defined - 'unknown' + sender?.handle ?? 'unknown' // should always be defined }: ${message.text}`, )}> {children} diff --git a/src/components/icons/VerifiedCheck.tsx b/src/components/icons/VerifiedCheck.tsx index 9d0aa9158..a98fdfc5d 100644 --- a/src/components/icons/VerifiedCheck.tsx +++ b/src/components/icons/VerifiedCheck.tsx @@ -3,28 +3,27 @@ import Svg, {Circle, Path} from 'react-native-svg' import {type Props, useCommonSVGProps} from '#/components/icons/common' -export const VerifiedCheck = React.forwardRef<Svg, Props>(function LogoImpl( - props, - ref, -) { - const {fill, size, style, ...rest} = useCommonSVGProps(props) +export const VerifiedCheck = React.forwardRef<Svg, Props>( + function LogoImpl(props, ref) { + const {fill, size, style, ...rest} = useCommonSVGProps(props) - return ( - <Svg - fill="none" - {...rest} - ref={ref} - viewBox="0 0 24 24" - width={size} - height={size} - style={[style]}> - <Circle cx="12" cy="12" r="11.5" fill={fill} /> - <Path - fill="#fff" - fillRule="evenodd" - clipRule="evenodd" - d="M17.659 8.175a1.361 1.361 0 0 1 0 1.925l-6.224 6.223a1.361 1.361 0 0 1-1.925 0L6.4 13.212a1.361 1.361 0 0 1 1.925-1.925l2.149 2.148 5.26-5.26a1.361 1.361 0 0 1 1.925 0Z" - /> - </Svg> - ) -}) + return ( + <Svg + fill="none" + {...rest} + ref={ref} + viewBox="0 0 24 24" + width={size} + height={size} + style={[style]}> + <Circle cx="12" cy="12" r="11.5" fill={fill} /> + <Path + fill="#fff" + fillRule="evenodd" + clipRule="evenodd" + d="M17.659 8.175a1.361 1.361 0 0 1 0 1.925l-6.224 6.223a1.361 1.361 0 0 1-1.925 0L6.4 13.212a1.361 1.361 0 0 1 1.925-1.925l2.149 2.148 5.26-5.26a1.361 1.361 0 0 1 1.925 0Z" + /> + </Svg> + ) + }, +) diff --git a/src/components/icons/VerifierCheck.tsx b/src/components/icons/VerifierCheck.tsx index 143c24b97..4674fdde8 100644 --- a/src/components/icons/VerifierCheck.tsx +++ b/src/components/icons/VerifierCheck.tsx @@ -3,33 +3,32 @@ import Svg, {Path} from 'react-native-svg' import {type Props, useCommonSVGProps} from '#/components/icons/common' -export const VerifierCheck = React.forwardRef<Svg, Props>(function LogoImpl( - props, - ref, -) { - const {fill, size, style, ...rest} = useCommonSVGProps(props) +export const VerifierCheck = React.forwardRef<Svg, Props>( + function LogoImpl(props, ref) { + const {fill, size, style, ...rest} = useCommonSVGProps(props) - return ( - <Svg - fill="none" - {...rest} - ref={ref} - viewBox="0 0 24 24" - width={size} - height={size} - style={[style]}> - <Path - fill={fill} - fillRule="evenodd" - clipRule="evenodd" - d="M8.792 1.615a4.154 4.154 0 0 1 6.416 0 4.154 4.154 0 0 0 3.146 1.515 4.154 4.154 0 0 1 4 5.017 4.154 4.154 0 0 0 .777 3.404 4.154 4.154 0 0 1-1.427 6.255 4.153 4.153 0 0 0-2.177 2.73 4.154 4.154 0 0 1-5.781 2.784 4.154 4.154 0 0 0-3.492 0 4.154 4.154 0 0 1-5.78-2.784 4.154 4.154 0 0 0-2.178-2.73A4.154 4.154 0 0 1 .87 11.551a4.154 4.154 0 0 0 .776-3.404A4.154 4.154 0 0 1 5.646 3.13a4.154 4.154 0 0 0 3.146-1.515Z" - /> - <Path - fill="#fff" - fillRule="evenodd" - clipRule="evenodd" - d="M17.861 8.26a1.438 1.438 0 0 1 0 2.033l-6.571 6.571a1.437 1.437 0 0 1-2.033 0L5.97 13.58a1.438 1.438 0 0 1 2.033-2.033l2.27 2.269 5.554-5.555a1.437 1.437 0 0 1 2.033 0Z" - /> - </Svg> - ) -}) + return ( + <Svg + fill="none" + {...rest} + ref={ref} + viewBox="0 0 24 24" + width={size} + height={size} + style={[style]}> + <Path + fill={fill} + fillRule="evenodd" + clipRule="evenodd" + d="M8.792 1.615a4.154 4.154 0 0 1 6.416 0 4.154 4.154 0 0 0 3.146 1.515 4.154 4.154 0 0 1 4 5.017 4.154 4.154 0 0 0 .777 3.404 4.154 4.154 0 0 1-1.427 6.255 4.153 4.153 0 0 0-2.177 2.73 4.154 4.154 0 0 1-5.781 2.784 4.154 4.154 0 0 0-3.492 0 4.154 4.154 0 0 1-5.78-2.784 4.154 4.154 0 0 0-2.178-2.73A4.154 4.154 0 0 1 .87 11.551a4.154 4.154 0 0 0 .776-3.404A4.154 4.154 0 0 1 5.646 3.13a4.154 4.154 0 0 0 3.146-1.515Z" + /> + <Path + fill="#fff" + fillRule="evenodd" + clipRule="evenodd" + d="M17.861 8.26a1.438 1.438 0 0 1 0 2.033l-6.571 6.571a1.437 1.437 0 0 1-2.033 0L5.97 13.58a1.438 1.438 0 0 1 2.033-2.033l2.27 2.269 5.554-5.555a1.437 1.437 0 0 1 2.033 0Z" + /> + </Svg> + ) + }, +) diff --git a/src/components/moderation/ContentHider.tsx b/src/components/moderation/ContentHider.tsx index d3f74c0c5..9e94a413c 100644 --- a/src/components/moderation/ContentHider.tsx +++ b/src/components/moderation/ContentHider.tsx @@ -1,6 +1,6 @@ import React from 'react' -import {StyleProp, View, ViewStyle} from 'react-native' -import {ModerationUI} from '@atproto/api' +import {type StyleProp, View, type ViewStyle} from 'react-native' +import {type ModerationUI} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -148,8 +148,8 @@ function ContentHiderActive({ modui.noOverride ? _(msg`Learn more about the moderation applied to this content`) : override - ? _(msg`Hides the content`) - : _(msg`Shows the content`) + ? _(msg`Hides the content`) + : _(msg`Shows the content`) }> {state => ( <View diff --git a/src/components/moderation/ReportDialog/index.tsx b/src/components/moderation/ReportDialog/index.tsx index acab1d21f..797ff533f 100644 --- a/src/components/moderation/ReportDialog/index.tsx +++ b/src/components/moderation/ReportDialog/index.tsx @@ -512,13 +512,13 @@ function StepTitle({ backgroundColor: active ? t.palette.primary_500 : completed - ? t.palette.primary_100 - : t.atoms.bg_contrast_25.backgroundColor, + ? t.palette.primary_100 + : t.atoms.bg_contrast_25.backgroundColor, borderColor: active ? t.palette.primary_500 : completed - ? t.palette.primary_400 - : t.atoms.border_contrast_low.borderColor, + ? t.palette.primary_400 + : t.atoms.border_contrast_low.borderColor, }, ]}> {completed ? ( @@ -533,8 +533,8 @@ function StepTitle({ color: active ? 'white' : completed - ? t.palette.primary_700 - : t.atoms.text_contrast_medium.color, + ? t.palette.primary_700 + : t.atoms.text_contrast_medium.color, fontVariant: ['tabular-nums'], width: 24, height: 24, diff --git a/src/components/verification/VerificationCheckButton.tsx b/src/components/verification/VerificationCheckButton.tsx index 9278a3072..2ccc730f6 100644 --- a/src/components/verification/VerificationCheckButton.tsx +++ b/src/components/verification/VerificationCheckButton.tsx @@ -130,8 +130,8 @@ export function Badge({ verifiedByHidden ? t.atoms.bg_contrast_100.backgroundColor : state.profile.isVerified - ? t.palette.primary_500 - : t.atoms.bg_contrast_100.backgroundColor + ? t.palette.primary_500 + : t.atoms.bg_contrast_100.backgroundColor } verifier={state.profile.role === 'verifier'} /> diff --git a/src/components/verification/VerificationsDialog.tsx b/src/components/verification/VerificationsDialog.tsx index 665bf3ba3..447e39e97 100644 --- a/src/components/verification/VerificationsDialog.tsx +++ b/src/components/verification/VerificationsDialog.tsx @@ -64,13 +64,13 @@ function Inner({ ? _(msg`You are verified`) : _(msg`Your verifications`) : state.profile.isVerified - ? _(msg`${userName} is verified`) - : _( - msg({ - message: `${userName}'s verifications`, - comment: `Possessive, meaning "the verifications of {userName}"`, - }), - ) + ? _(msg`${userName} is verified`) + : _( + msg({ + message: `${userName}'s verifications`, + comment: `Possessive, meaning "the verifications of {userName}"`, + }), + ) return ( <Dialog.ScrollableInner diff --git a/src/lib/moderation.ts b/src/lib/moderation.ts index cda7d3fa8..d33e10a12 100644 --- a/src/lib/moderation.ts +++ b/src/lib/moderation.ts @@ -1,18 +1,18 @@ import React from 'react' import { - AppBskyLabelerDefs, + type AppBskyLabelerDefs, BskyAgent, - ComAtprotoLabelDefs, - InterpretedLabelValueDefinition, + type ComAtprotoLabelDefs, + type InterpretedLabelValueDefinition, LABELS, - ModerationCause, - ModerationOpts, - ModerationUI, + type ModerationCause, + type ModerationOpts, + type ModerationUI, } from '@atproto/api' import {sanitizeDisplayName} from '#/lib/strings/display-names' import {sanitizeHandle} from '#/lib/strings/handles' -import {AppModerationCause} from '#/components/Pills' +import {type AppModerationCause} from '#/components/Pills' export const ADULT_CONTENT_LABELS = ['sexual', 'nudity', 'porn'] export const OTHER_SELF_LABELS = ['graphic-media'] @@ -29,8 +29,8 @@ export function getModerationCauseKey( cause.source.type === 'labeler' ? cause.source.did : cause.source.type === 'list' - ? cause.source.list.uri - : 'user' + ? cause.source.list.uri + : 'user' if (cause.type === 'label') { return `label:${cause.label.val}:${source}` } diff --git a/src/lib/moderation/useModerationCauseDescription.ts b/src/lib/moderation/useModerationCauseDescription.ts index 9e3470077..5aa9db4c2 100644 --- a/src/lib/moderation/useModerationCauseDescription.ts +++ b/src/lib/moderation/useModerationCauseDescription.ts @@ -1,8 +1,8 @@ import React from 'react' import { BSKY_LABELER_DID, - ModerationCause, - ModerationCauseSource, + type ModerationCause, + type ModerationCauseSource, } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -12,10 +12,10 @@ import {useLabelDefinitions} from '#/state/preferences' import {useSession} from '#/state/session' import {CircleBanSign_Stroke2_Corner0_Rounded as CircleBanSign} from '#/components/icons/CircleBanSign' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' -import {Props as SVGIconProps} from '#/components/icons/common' +import {type Props as SVGIconProps} from '#/components/icons/common' import {EyeSlash_Stroke2_Corner0_Rounded as EyeSlash} from '#/components/icons/EyeSlash' import {Warning_Stroke2_Corner0_Rounded as Warning} from '#/components/icons/Warning' -import {AppModerationCause} from '#/components/Pills' +import {type AppModerationCause} from '#/components/Pills' import {useGlobalLabelStrings} from './useGlobalLabelStrings' import {getDefinition, getLabelStrings} from './useLabelInfo' @@ -153,8 +153,8 @@ export function useModerationCauseDescription( def.identifier === '!no-unauthenticated' ? EyeSlash : def.severity === 'alert' - ? Warning - : CircleInfo, + ? Warning + : CircleInfo, name: strings.name, description: strings.description, source, diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx index 7f04da126..f509f2980 100644 --- a/src/lib/statsig/statsig.tsx +++ b/src/lib/statsig/statsig.tsx @@ -1,17 +1,17 @@ import React from 'react' import {Platform} from 'react-native' -import {AppState, AppStateStatus} from 'react-native' +import {AppState, type AppStateStatus} from 'react-native' import {Statsig, StatsigProvider} from 'statsig-react-native-expo' import {BUNDLE_DATE, BUNDLE_IDENTIFIER, IS_TESTFLIGHT} from '#/lib/app-info' import {logger} from '#/logger' -import {MetricEvents} from '#/logger/metrics' +import {type MetricEvents} from '#/logger/metrics' import {isWeb} from '#/platform/detection' import * as persisted from '#/state/persisted' import {useSession} from '../../state/session' import {timeout} from '../async/timeout' import {useNonReactiveCallback} from '../hooks/useNonReactiveCallback' -import {Gate} from './gates' +import {type Gate} from './gates' const SDK_KEY = 'client-SXJakO39w9vIhl3D44u8UupyzFl4oZ2qPIkjwcvuPsV' @@ -51,8 +51,8 @@ function createStatsigOptions(prefetchUsers: StatsigUser[]) { process.env.NODE_ENV === 'development' ? 'development' : IS_TESTFLIGHT - ? 'staging' - : 'production', + ? 'staging' + : 'production', }, // Don't block on waiting for network. The fetched config will kick in on next load. // This ensures the UI is always consistent and doesn't update mid-session. diff --git a/src/lib/strings/embed-player.ts b/src/lib/strings/embed-player.ts index 0b3073b95..0cd0b4921 100644 --- a/src/lib/strings/embed-player.ts +++ b/src/lib/strings/embed-player.ts @@ -11,8 +11,8 @@ const IFRAME_HOST = isWeb ? 'http://localhost:8100' : 'https://bsky.app' : __DEV__ && !process.env.JEST_WORKER_ID - ? 'http://localhost:8100' - : 'https://bsky.app' + ? 'http://localhost:8100' + : 'https://bsky.app' export const embedPlayerSources = [ 'youtube', diff --git a/src/platform/polyfills.ts b/src/platform/polyfills.ts index 47581eff4..bb1763006 100644 --- a/src/platform/polyfills.ts +++ b/src/platform/polyfills.ts @@ -41,12 +41,12 @@ globalThis.atob = (str: string): string => { r1 === 64 ? String.fromCharCode((bitmap >> 16) & 255) : r2 === 64 - ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255) - : String.fromCharCode( - (bitmap >> 16) & 255, - (bitmap >> 8) & 255, - bitmap & 255, - ) + ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255) + : String.fromCharCode( + (bitmap >> 16) & 255, + (bitmap >> 8) & 255, + bitmap & 255, + ) } return result } diff --git a/src/screens/Login/index.tsx b/src/screens/Login/index.tsx index e4e2f43f0..601d76606 100644 --- a/src/screens/Login/index.tsx +++ b/src/screens/Login/index.tsx @@ -49,8 +49,8 @@ export const Login = ({onPressBack}: {onPressBack: () => void}) => { requestedAccount ? Forms.Login : accounts.length - ? Forms.ChooseAccount - : Forms.Login, + ? Forms.ChooseAccount + : Forms.Login, ) const { diff --git a/src/screens/Messages/ChatList.tsx b/src/screens/Messages/ChatList.tsx index 9fd54f1b0..388d23ec2 100644 --- a/src/screens/Messages/ChatList.tsx +++ b/src/screens/Messages/ChatList.tsx @@ -155,7 +155,7 @@ export function MessagesScreen({navigation, route}: Props) { profiles: inboxPreviewConvos.slice(0, 3), }, ...conversations.map( - convo => ({type: 'CONVERSATION', conversation: convo} as const), + convo => ({type: 'CONVERSATION', conversation: convo}) as const, ), ] satisfies ListItem[] } diff --git a/src/screens/Onboarding/StepFinished.tsx b/src/screens/Onboarding/StepFinished.tsx index e725b7b80..b30f61053 100644 --- a/src/screens/Onboarding/StepFinished.tsx +++ b/src/screens/Onboarding/StepFinished.tsx @@ -176,8 +176,8 @@ export function StepFinished() { avatarResult: profileStepResults.isCreatedAvatar ? 'created' : profileStepResults.image - ? 'uploaded' - : 'default', + ? 'uploaded' + : 'default', }) })(), requestNotificationsPermission('AfterOnboarding'), diff --git a/src/screens/Profile/Header/ProfileHeaderLabeler.tsx b/src/screens/Profile/Header/ProfileHeaderLabeler.tsx index cdb95423f..2185fd9c8 100644 --- a/src/screens/Profile/Header/ProfileHeaderLabeler.tsx +++ b/src/screens/Profile/Header/ProfileHeaderLabeler.tsx @@ -214,8 +214,8 @@ let ProfileHeaderLabeler = ({ ? t.palette.contrast_50 : t.palette.contrast_25 : state.hovered || state.pressed - ? tokens.color.temp_purple_dark - : tokens.color.temp_purple, + ? tokens.color.temp_purple_dark + : tokens.color.temp_purple, }, ]}> <Text diff --git a/src/screens/Search/Explore.tsx b/src/screens/Search/Explore.tsx index 92eed25aa..15eb9daaa 100644 --- a/src/screens/Search/Explore.tsx +++ b/src/screens/Search/Explore.tsx @@ -342,11 +342,11 @@ export function Explore({ ]) const topBorder = useMemo( - () => ({type: 'topBorder', key: 'top-border'} as const), + () => ({type: 'topBorder', key: 'top-border'}) as const, [], ) const trendingTopicsModule = useMemo( - () => ({type: 'trendingTopics', key: 'trending-topics'} as const), + () => ({type: 'trendingTopics', key: 'trending-topics'}) as const, [], ) const suggestedFollowsModule = useMemo(() => { diff --git a/src/screens/Settings/AppIconSettings/useAppIconSets.ts b/src/screens/Settings/AppIconSettings/useAppIconSets.ts index 5c0ff698e..fd3caeb30 100644 --- a/src/screens/Settings/AppIconSettings/useAppIconSets.ts +++ b/src/screens/Settings/AppIconSettings/useAppIconSets.ts @@ -2,7 +2,7 @@ import {useMemo} from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {AppIconSet} from '#/screens/Settings/AppIconSettings/types' +import {type AppIconSet} from '#/screens/Settings/AppIconSettings/types' export function useAppIconSets() { const {_} = useLingui() @@ -13,20 +13,28 @@ export function useAppIconSets() { id: 'default_light', name: _(msg({context: 'Name of app icon variant', message: 'Light'})), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_default_light.png`) + return require( + `../../../../assets/app-icons/ios_icon_default_light.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_default_light.png`) + return require( + `../../../../assets/app-icons/android_icon_default_light.png`, + ) }, }, { id: 'default_dark', name: _(msg({context: 'Name of app icon variant', message: 'Dark'})), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_default_dark.png`) + return require( + `../../../../assets/app-icons/ios_icon_default_dark.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_default_dark.png`) + return require( + `../../../../assets/app-icons/android_icon_default_dark.png`, + ) }, }, ] satisfies AppIconSet[] @@ -39,10 +47,14 @@ export function useAppIconSets() { id: 'core_aurora', name: _(msg({context: 'Name of app icon variant', message: 'Aurora'})), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_core_aurora.png`) + return require( + `../../../../assets/app-icons/ios_icon_core_aurora.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_core_aurora.png`) + return require( + `../../../../assets/app-icons/android_icon_core_aurora.png`, + ) }, }, // { @@ -59,20 +71,28 @@ export function useAppIconSets() { id: 'core_sunrise', name: _(msg({context: 'Name of app icon variant', message: 'Sunrise'})), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_core_sunrise.png`) + return require( + `../../../../assets/app-icons/ios_icon_core_sunrise.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_core_sunrise.png`) + return require( + `../../../../assets/app-icons/android_icon_core_sunrise.png`, + ) }, }, { id: 'core_sunset', name: _(msg({context: 'Name of app icon variant', message: 'Sunset'})), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_core_sunset.png`) + return require( + `../../../../assets/app-icons/ios_icon_core_sunset.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_core_sunset.png`) + return require( + `../../../../assets/app-icons/android_icon_core_sunset.png`, + ) }, }, { @@ -81,10 +101,14 @@ export function useAppIconSets() { msg({context: 'Name of app icon variant', message: 'Midnight'}), ), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_core_midnight.png`) + return require( + `../../../../assets/app-icons/ios_icon_core_midnight.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_core_midnight.png`) + return require( + `../../../../assets/app-icons/android_icon_core_midnight.png`, + ) }, }, { @@ -93,10 +117,14 @@ export function useAppIconSets() { msg({context: 'Name of app icon variant', message: 'Flat Blue'}), ), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_core_flat_blue.png`) + return require( + `../../../../assets/app-icons/ios_icon_core_flat_blue.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_core_flat_blue.png`) + return require( + `../../../../assets/app-icons/android_icon_core_flat_blue.png`, + ) }, }, { @@ -105,10 +133,14 @@ export function useAppIconSets() { msg({context: 'Name of app icon variant', message: 'Flat White'}), ), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_core_flat_white.png`) + return require( + `../../../../assets/app-icons/ios_icon_core_flat_white.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_core_flat_white.png`) + return require( + `../../../../assets/app-icons/android_icon_core_flat_white.png`, + ) }, }, { @@ -117,10 +149,14 @@ export function useAppIconSets() { msg({context: 'Name of app icon variant', message: 'Flat Black'}), ), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_core_flat_black.png`) + return require( + `../../../../assets/app-icons/ios_icon_core_flat_black.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_core_flat_black.png`) + return require( + `../../../../assets/app-icons/android_icon_core_flat_black.png`, + ) }, }, { @@ -132,10 +168,14 @@ export function useAppIconSets() { }), ), iosImage: () => { - return require(`../../../../assets/app-icons/ios_icon_core_classic.png`) + return require( + `../../../../assets/app-icons/ios_icon_core_classic.png`, + ) }, androidImage: () => { - return require(`../../../../assets/app-icons/android_icon_core_classic.png`) + return require( + `../../../../assets/app-icons/android_icon_core_classic.png`, + ) }, }, ] satisfies AppIconSet[] diff --git a/src/screens/Settings/components/ChangeHandleDialog.tsx b/src/screens/Settings/components/ChangeHandleDialog.tsx index a39d958ab..59e004252 100644 --- a/src/screens/Settings/components/ChangeHandleDialog.tsx +++ b/src/screens/Settings/components/ChangeHandleDialog.tsx @@ -525,8 +525,8 @@ function OwnHandlePage({goToServiceHandle}: {goToServiceHandle: () => void}) { isVerified ? _(msg`Update to ${domain}`) : dnsPanel - ? _(msg`Verify DNS Record`) - : _(msg`Verify Text File`) + ? _(msg`Verify DNS Record`) + : _(msg`Verify Text File`) } variant="solid" size="large" diff --git a/src/state/cache/profile-shadow.ts b/src/state/cache/profile-shadow.ts index 31bf55d13..0d3bb1b17 100644 --- a/src/state/cache/profile-shadow.ts +++ b/src/state/cache/profile-shadow.ts @@ -144,8 +144,8 @@ function mergeShadow<TProfileView extends bsky.profile.AnyProfileView>( 'status' in shadow ? shadow.status : 'status' in profile - ? profile.status - : undefined, + ? profile.status + : undefined, }) } diff --git a/src/state/queries/explore-feed-previews.tsx b/src/state/queries/explore-feed-previews.tsx index 45bfc5c48..f02adde79 100644 --- a/src/state/queries/explore-feed-previews.tsx +++ b/src/state/queries/explore-feed-previews.tsx @@ -36,38 +36,27 @@ const RQKEY = (feeds: string[]) => [RQKEY_ROOT, feeds] const LIMIT = 8 // sliced to 6, overfetch to account for moderation const PINNED_POST_URIS: Record<string, boolean> = { // 📰 News - 'at://did:plc:kkf4naxqmweop7dv4l2iqqf5/app.bsky.feed.post/3lgh27w2ngc2b': - true, + 'at://did:plc:kkf4naxqmweop7dv4l2iqqf5/app.bsky.feed.post/3lgh27w2ngc2b': true, // Gardening - 'at://did:plc:5rw2on4i56btlcajojaxwcat/app.bsky.feed.post/3kjorckgcwc27': - true, + 'at://did:plc:5rw2on4i56btlcajojaxwcat/app.bsky.feed.post/3kjorckgcwc27': true, // Web Development Trending - 'at://did:plc:m2sjv3wncvsasdapla35hzwj/app.bsky.feed.post/3lfaw445axs22': - true, + 'at://did:plc:m2sjv3wncvsasdapla35hzwj/app.bsky.feed.post/3lfaw445axs22': true, // Anime & Manga EN - 'at://did:plc:tazrmeme4dzahimsykusrwrk/app.bsky.feed.post/3knxx2gmkns2y': - true, + 'at://did:plc:tazrmeme4dzahimsykusrwrk/app.bsky.feed.post/3knxx2gmkns2y': true, // 📽️ Film - 'at://did:plc:2hwwem55ce6djnk6bn62cstr/app.bsky.feed.post/3llhpzhbq7c2g': - true, + 'at://did:plc:2hwwem55ce6djnk6bn62cstr/app.bsky.feed.post/3llhpzhbq7c2g': true, // PopSky - 'at://did:plc:lfdf4srj43iwdng7jn35tjsp/app.bsky.feed.post/3lbblgly65c2g': - true, + 'at://did:plc:lfdf4srj43iwdng7jn35tjsp/app.bsky.feed.post/3lbblgly65c2g': true, // Science - 'at://did:plc:hu2obebw3nhfj667522dahfg/app.bsky.feed.post/3kl33otd6ob2s': - true, + 'at://did:plc:hu2obebw3nhfj667522dahfg/app.bsky.feed.post/3kl33otd6ob2s': true, // Birds! 🦉 - 'at://did:plc:ffkgesg3jsv2j7aagkzrtcvt/app.bsky.feed.post/3lbg4r57yk22d': - true, + 'at://did:plc:ffkgesg3jsv2j7aagkzrtcvt/app.bsky.feed.post/3lbg4r57yk22d': true, // Astronomy - 'at://did:plc:xy2zorw2ys47poflotxthlzg/app.bsky.feed.post/3kyzye4lujs2w': - true, + 'at://did:plc:xy2zorw2ys47poflotxthlzg/app.bsky.feed.post/3kyzye4lujs2w': true, // What's Cooking 🍽️ - 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3lfqhgvxbqc2q': - true, + 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3lfqhgvxbqc2q': true, // BookSky 💙📚 #booksky - 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3kgrm2rw5ww2e': - true, + 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3kgrm2rw5ww2e': true, } export type FeedPreviewItem = diff --git a/src/state/queries/notifications/settings.ts b/src/state/queries/notifications/settings.ts index 986d0b01d..02c0fe23b 100644 --- a/src/state/queries/notifications/settings.ts +++ b/src/state/queries/notifications/settings.ts @@ -36,9 +36,8 @@ export function useNotificationSettingsUpdateMutation() { mutationFn: async ( update: Partial<AppBskyNotificationDefs.Preferences>, ) => { - const response = await agent.app.bsky.notification.putPreferencesV2( - update, - ) + const response = + await agent.app.bsky.notification.putPreferencesV2(update) return response.data.preferences }, onMutate: update => { diff --git a/src/state/queries/notifications/unread.tsx b/src/state/queries/notifications/unread.tsx index ba2377a78..da8d68126 100644 --- a/src/state/queries/notifications/unread.tsx +++ b/src/state/queries/notifications/unread.tsx @@ -14,7 +14,7 @@ import {useAgent, useSession} from '#/state/session' import {useModerationOpts} from '../../preferences/moderation-opts' import {truncateAndInvalidate} from '../util' import {RQKEY as RQKEY_NOTIFS} from './feed' -import {CachedFeedPage, FeedPage} from './types' +import {type CachedFeedPage, type FeedPage} from './types' import {fetchPage} from './util' const UPDATE_INTERVAL = 30 * 1e3 // 30sec @@ -94,8 +94,8 @@ export function Provider({children}: React.PropsWithChildren<{}>) { data.event === '30+' ? 30 : data.event === '' - ? 0 - : parseInt(data.event, 10) || 1, + ? 0 + : parseInt(data.event, 10) || 1, } setNumUnread(data.event) } @@ -164,8 +164,8 @@ export function Provider({children}: React.PropsWithChildren<{}>) { unreadCount >= 30 ? '30+' : unreadCount === 0 - ? '' - : String(unreadCount) + ? '' + : String(unreadCount) // track last sync const now = new Date() diff --git a/src/state/queries/usePostThread/index.ts b/src/state/queries/usePostThread/index.ts index 782888cfb..8495df04c 100644 --- a/src/state/queries/usePostThread/index.ts +++ b/src/state/queries/usePostThread/index.ts @@ -52,8 +52,8 @@ export function usePostThread({anchor}: {anchor?: string}) { return view === 'linear' ? LINEAR_VIEW_BELOW : isWeb && gtPhone - ? TREE_VIEW_BELOW_DESKTOP - : TREE_VIEW_BELOW + ? TREE_VIEW_BELOW_DESKTOP + : TREE_VIEW_BELOW }, [view, gtPhone]) const postThreadQueryKey = createPostThreadQueryKey({ diff --git a/src/state/queries/usePostThread/traversal.ts b/src/state/queries/usePostThread/traversal.ts index 124591125..7d8cd6464 100644 --- a/src/state/queries/usePostThread/traversal.ts +++ b/src/state/queries/usePostThread/traversal.ts @@ -444,7 +444,7 @@ export function buildThread({ const anchorPost = items.at(0) const hasAnchorFromCache = anchorPost && anchorPost.type === 'threadPost' const skeletonReplies = hasAnchorFromCache - ? anchorPost.value.post.replyCount ?? 4 + ? (anchorPost.value.post.replyCount ?? 4) : 4 if (!items.length) { diff --git a/src/storage/index.ts b/src/storage/index.ts index 9b39e1c1a..4d45134e1 100644 --- a/src/storage/index.ts +++ b/src/storage/index.ts @@ -1,7 +1,7 @@ import {useCallback, useEffect, useState} from 'react' import {MMKV} from 'react-native-mmkv' -import {Account, Device} from '#/storage/schema' +import {type Account, type Device} from '#/storage/schema' export * from '#/storage/schema' @@ -83,18 +83,10 @@ export class Storage<Scopes extends unknown[], Schema> { } } -type StorageSchema<T extends Storage<any, any>> = T extends Storage< - any, - infer U -> - ? U - : never -type StorageScopes<T extends Storage<any, any>> = T extends Storage< - infer S, - any -> - ? S - : never +type StorageSchema<T extends Storage<any, any>> = + T extends Storage<any, infer U> ? U : never +type StorageScopes<T extends Storage<any, any>> = + T extends Storage<infer S, any> ? S : never /** * Hook to use a storage instance. Acts like a useState hook, but persists the diff --git a/src/style.css b/src/style.css index 53e4d369b..a4a2c455f 100644 --- a/src/style.css +++ b/src/style.css @@ -328,7 +328,8 @@ input[type='range'][orient='vertical']::-moz-range-thumb { /* #/components/Select/index.web.tsx */ .radix-select-content { - box-shadow: 0px 6px 24px -10px rgba(22, 23, 24, 0.25), + box-shadow: + 0px 6px 24px -10px rgba(22, 23, 24, 0.25), 0px 6px 12px -12px rgba(22, 23, 24, 0.15); min-width: var(--radix-select-trigger-width); max-height: var(--radix-select-content-available-height); diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index de060c6c2..cc2859be9 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -518,8 +518,8 @@ export const ComposePost = ({ thread.posts.length > 1 ? _(msg`Your posts have been published`) : replyTo - ? _(msg`Your reply has been published`) - : _(msg`Your post has been published`), + ? _(msg`Your reply has been published`) + : _(msg`Your post has been published`), ) }, [ _, @@ -1000,20 +1000,20 @@ function ComposerTopBar({ }), ) : isThread - ? _( - msg({ - message: 'Publish posts', - comment: - 'Accessibility label for button to publish multiple posts in a thread', - }), - ) - : _( - msg({ - message: 'Publish post', - comment: - 'Accessibility label for button to publish a single post', - }), - ) + ? _( + msg({ + message: 'Publish posts', + comment: + 'Accessibility label for button to publish multiple posts in a thread', + }), + ) + : _( + msg({ + message: 'Publish post', + comment: + 'Accessibility label for button to publish a single post', + }), + ) } variant="solid" color="primary" diff --git a/src/view/com/composer/photos/Gallery.tsx b/src/view/com/composer/photos/Gallery.tsx index bc18c81f1..c44461b60 100644 --- a/src/view/com/composer/photos/Gallery.tsx +++ b/src/view/com/composer/photos/Gallery.tsx @@ -1,12 +1,12 @@ import React from 'react' import { - ImageStyle, + type ImageStyle, Keyboard, - LayoutChangeEvent, + type LayoutChangeEvent, StyleSheet, TouchableOpacity, View, - ViewStyle, + type ViewStyle, } from 'react-native' import {Image} from 'expo-image' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' @@ -14,14 +14,14 @@ import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' -import {Dimensions} from '#/lib/media/types' +import {type Dimensions} from '#/lib/media/types' import {colors, s} from '#/lib/styles' import {isNative} from '#/platform/detection' -import {ComposerImage, cropImage} from '#/state/gallery' +import {type ComposerImage, cropImage} from '#/state/gallery' import {Text} from '#/view/com/util/text/Text' import {useTheme} from '#/alf' import * as Dialog from '#/components/Dialog' -import {PostAction} from '../state/composer' +import {type PostAction} from '../state/composer' import {EditImageDialog} from './EditImageDialog' import {ImageAltTextDialog} from './ImageAltTextDialog' @@ -74,8 +74,8 @@ const GalleryInner = ({images, containerInfo, dispatch}: GalleryInnerProps) => { altTextControlStyle: isOverflow ? {left: 4, bottom: 4} : !isMobile && images.length < 3 - ? {left: 8, top: 8} - : {left: 4, top: 4}, + ? {left: 8, top: 8} + : {left: 4, top: 4}, imageControlsStyle: { display: 'flex' as const, flexDirection: 'row' as const, @@ -83,8 +83,8 @@ const GalleryInner = ({images, containerInfo, dispatch}: GalleryInnerProps) => { ...(isOverflow ? {top: 4, right: 4, gap: 4} : !isMobile && images.length < 3 - ? {top: 8, right: 8, gap: 8} - : {top: 4, right: 4, gap: 4}), + ? {top: 8, right: 8, gap: 8} + : {top: 4, right: 4, gap: 4}), zIndex: 1, }, imageStyle: { diff --git a/src/view/com/composer/state/composer.ts b/src/view/com/composer/state/composer.ts index f5a55f175..c673f2134 100644 --- a/src/view/com/composer/state/composer.ts +++ b/src/view/com/composer/state/composer.ts @@ -1,13 +1,13 @@ -import {ImagePickerAsset} from 'expo-image-picker' +import {type ImagePickerAsset} from 'expo-image-picker' import { - AppBskyFeedPostgate, + type AppBskyFeedPostgate, AppBskyRichtextFacet, - BskyPreferences, + type BskyPreferences, RichText, } from '@atproto/api' import {nanoid} from 'nanoid/non-secure' -import {SelfLabel} from '#/lib/moderation' +import {type SelfLabel} from '#/lib/moderation' import {insertMentionAt} from '#/lib/strings/mention-manip' import {shortenLinks} from '#/lib/strings/rich-text-manip' import { @@ -15,17 +15,22 @@ import { postUriToRelativePath, toBskyAppUrl, } from '#/lib/strings/url-helpers' -import {ComposerImage, createInitialImages} from '#/state/gallery' +import {type ComposerImage, createInitialImages} from '#/state/gallery' import {createPostgateRecord} from '#/state/queries/postgate/util' -import {Gif} from '#/state/queries/tenor' +import {type Gif} from '#/state/queries/tenor' import {threadgateRecordToAllowUISetting} from '#/state/queries/threadgate' -import {ThreadgateAllowUISetting} from '#/state/queries/threadgate' -import {ComposerOpts} from '#/state/shell/composer' +import {type ThreadgateAllowUISetting} from '#/state/queries/threadgate' +import {type ComposerOpts} from '#/state/shell/composer' import { - LinkFacetMatch, + type LinkFacetMatch, suggestLinkCardUri, } from '#/view/com/composer/text-input/text-input-util' -import {createVideoState, VideoAction, videoReducer, VideoState} from './video' +import { + createVideoState, + type VideoAction, + videoReducer, + type VideoState, +} from './video' type ImagesMedia = { type: 'images' @@ -514,12 +519,12 @@ export function createComposerState({ text: initText ? initText : initMention - ? insertMentionAt( - `@${initMention}`, - initMention.length + 1, - `${initMention}`, - ) - : '', + ? insertMentionAt( + `@${initMention}`, + initMention.length + 1, + `${initMention}`, + ) + : '', }) let link: Link | undefined diff --git a/src/view/com/composer/text-input/web/Autocomplete.tsx b/src/view/com/composer/text-input/web/Autocomplete.tsx index 62f19c63d..94ecb53cc 100644 --- a/src/view/com/composer/text-input/web/Autocomplete.tsx +++ b/src/view/com/composer/text-input/web/Autocomplete.tsx @@ -209,8 +209,8 @@ function AutocompleteProfileCard({ itemIndex === 0 ? styles.firstMention : itemIndex === totalItems - 1 - ? styles.lastMention - : undefined, + ? styles.lastMention + : undefined, ]} onPress={onPress} accessibilityRole="button"> diff --git a/src/view/com/lightbox/Lightbox.web.tsx b/src/view/com/lightbox/Lightbox.web.tsx index f6b6223ce..97811da7f 100644 --- a/src/view/com/lightbox/Lightbox.web.tsx +++ b/src/view/com/lightbox/Lightbox.web.tsx @@ -1,17 +1,17 @@ import React, {useCallback, useEffect, useState} from 'react' import { Image, - ImageStyle, + type ImageStyle, Pressable, StyleSheet, TouchableOpacity, TouchableWithoutFeedback, View, - ViewStyle, + type ViewStyle, } from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -21,7 +21,7 @@ import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import {colors, s} from '#/lib/styles' import {useLightbox, useLightboxControls} from '#/state/lightbox' import {Text} from '../util/text/Text' -import {ImageSource} from './ImageViewing/@types' +import {type ImageSource} from './ImageViewing/@types' import ImageDefaultHeader from './ImageViewing/components/ImageDefaultHeader' export function Lightbox() { @@ -121,8 +121,8 @@ function LightboxInner({ img.type === 'circle-avi' ? '50%' : img.type === 'rect-avi' - ? '10%' - : 0, + ? '10%' + : 0, } as ImageStyle } alt={img.alt} diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 592224ff5..54eea0493 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -630,8 +630,8 @@ let PostThreadItemLoaded = ({ showChildReplyLine && !isThreadedChild ? 0 : isThreadedChildAdjacentBot - ? 4 - : 8, + ? 4 + : 8, }, ]}> {/* If we are in threaded mode, the avatar is rendered in PostMeta */} diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx index cbbe4a00f..1d0649b2e 100644 --- a/src/view/com/posts/PostFeed.tsx +++ b/src/view/com/posts/PostFeed.tsx @@ -132,12 +132,11 @@ type FeedRow = key: string } -export function getItemsForFeedback(feedRow: FeedRow): - | { - item: FeedPostSliceItem - feedContext: string | undefined - reqId: string | undefined - }[] { +export function getItemsForFeedback(feedRow: FeedRow): { + item: FeedPostSliceItem + feedContext: string | undefined + reqId: string | undefined +}[] { if (feedRow.type === 'sliceItem') { return feedRow.slice.items.map(item => ({ item, diff --git a/src/view/com/posts/PostFeedErrorMessage.tsx b/src/view/com/posts/PostFeedErrorMessage.tsx index 39347b89c..808ef9fff 100644 --- a/src/view/com/posts/PostFeedErrorMessage.tsx +++ b/src/view/com/posts/PostFeedErrorMessage.tsx @@ -1,15 +1,19 @@ import React from 'react' import {View} from 'react-native' -import {AppBskyActorDefs, AppBskyFeedGetAuthorFeed, AtUri} from '@atproto/api' +import { + type AppBskyActorDefs, + AppBskyFeedGetAuthorFeed, + AtUri, +} from '@atproto/api' import {msg as msgLingui, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {cleanError} from '#/lib/strings/errors' import {logger} from '#/logger' -import {FeedDescriptor} from '#/state/queries/post-feed' +import {type FeedDescriptor} from '#/state/queries/post-feed' import {useRemoveFeedMutation} from '#/state/queries/preferences' import * as Prompt from '#/components/Prompt' import {EmptyState} from '../util/EmptyState' @@ -119,7 +123,7 @@ function FeedgenErrorMessage({ [KnownError.FeedTooManyRequests]: _l( msgLingui`This feed is currently receiving high traffic and is temporarily unavailable. Please try again later.`, ), - }[knownError]), + })[knownError], [_l, knownError], ) const [_, uri] = feedDesc.split('|') diff --git a/src/view/com/profile/ProfileMenu.tsx b/src/view/com/profile/ProfileMenu.tsx index d18ba12c1..879bf22f9 100644 --- a/src/view/com/profile/ProfileMenu.tsx +++ b/src/view/com/profile/ProfileMenu.tsx @@ -461,12 +461,12 @@ let ProfileMenu = ({ msg`The account will be able to interact with you after unblocking.`, ) : profile.associated?.labeler - ? _( - msg`Blocking will not prevent labels from being applied on your account, but it will stop this account from replying in your threads or interacting with you.`, - ) - : _( - msg`Blocked accounts cannot reply in your threads, mention you, or otherwise interact with you.`, - ) + ? _( + msg`Blocking will not prevent labels from being applied on your account, but it will stop this account from replying in your threads or interacting with you.`, + ) + : _( + msg`Blocked accounts cannot reply in your threads, mention you, or otherwise interact with you.`, + ) } onConfirm={blockAccount} confirmButtonCta={ diff --git a/src/view/com/util/List.web.tsx b/src/view/com/util/List.web.tsx index 18f7d6fa7..55dafb3dd 100644 --- a/src/view/com/util/List.web.tsx +++ b/src/view/com/util/List.web.tsx @@ -1,6 +1,11 @@ import React, {isValidElement, memo, startTransition, useRef} from 'react' -import {FlatListProps, StyleSheet, View, ViewProps} from 'react-native' -import {ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/hook/commonTypes' +import { + type FlatListProps, + StyleSheet, + View, + type ViewProps, +} from 'react-native' +import {type ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/hook/commonTypes' import {batchedUpdates} from '#/lib/batchedUpdates' import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' @@ -205,7 +210,7 @@ function ListImpl<ItemT>( behavior: animated ? 'smooth' : 'instant', }) }, - } as any), // TODO: Better types. + }) as any, // TODO: Better types. [getScrollableNode], ) diff --git a/src/view/screens/DebugMod.tsx b/src/view/screens/DebugMod.tsx index 0ccf9b67a..d2e492f7e 100644 --- a/src/view/screens/DebugMod.tsx +++ b/src/view/screens/DebugMod.tsx @@ -112,14 +112,14 @@ export const DebugModScreen = ({}: NativeStackScreenProps< }), ] : scenario[0] === 'label' && target[0] === 'profile' - ? [ - mock.label({ - src: isSelfLabel ? did : undefined, - val: label[0], - uri: `at://${did}/app.bsky.actor.profile/self`, - }), - ] - : undefined, + ? [ + mock.label({ + src: isSelfLabel ? did : undefined, + val: label[0], + uri: `at://${did}/app.bsky.actor.profile/self`, + }), + ] + : undefined, viewer: mock.actorViewerState({ following: isFollowing ? `at://${currentAccount?.did || ''}/app.bsky.graph.follow/1234` |