From 3e2c181c404e2070873bc9c473b428a610bd193e Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 9 Sep 2025 18:09:10 +0300 Subject: [PATCH 01/10] Upgrade `@types/react` to 19 and run codemod (attempt 2) (#8918) * update dependencies * rm `import type React from 'react'` * run codemods * patch discord types * update types/react-dom * Update yarn.lock --- package.json | 7 +-- patches/@discord+bottom-sheet+4.6.1.patch | 13 ++++ src/Navigation.tsx | 2 +- src/alf/typography.tsx | 1 - src/components/Button.tsx | 4 +- src/components/ContextMenu/index.tsx | 3 +- src/components/ContextMenu/types.ts | 1 - src/components/Dialog/types.ts | 3 +- src/components/Lists.tsx | 1 - src/components/Portal.tsx | 2 +- .../VideoEmbedInner/VideoEmbedInnerWeb.tsx | 2 +- .../VideoEmbedInner/VideoFallback.tsx | 1 - .../web-controls/ControlButton.tsx | 1 - .../VideoEmbedInner/web-controls/Scrubber.tsx | 1 - .../web-controls/VideoControls.tsx | 10 +-- .../web-controls/VolumeControl.tsx | 1 - .../VideoEmbedInner/web-controls/utils.tsx | 2 +- .../Post/Embed/VideoEmbed/index.web.tsx | 3 +- .../PostControls/PostMenu/index.tsx | 1 - .../ShareMenu/ShareMenuItems.web.tsx | 1 - .../PostControls/ShareMenu/index.tsx | 1 - src/components/ProfileHoverCard/types.ts | 2 - src/components/ProgressGuide/FollowDialog.tsx | 6 +- src/components/ProgressGuide/Toast.tsx | 4 +- src/components/Select/types.ts | 2 +- src/components/dialogs/GifSelect.tsx | 2 +- .../dialogs/SearchablePeopleList.tsx | 2 +- src/components/dms/ActionsWrapper.web.tsx | 1 - src/components/forms/InputGroup.tsx | 7 ++- src/components/forms/TextField.tsx | 4 +- src/components/forms/ToggleButton.tsx | 9 ++- src/components/hooks/useFullscreen.ts | 2 +- src/components/moderation/LabelPreference.tsx | 1 - src/lib/hooks/useAnimatedValue.ts | 2 +- src/lib/hooks/useOTAUpdates.ts | 2 +- src/lib/merge-refs.ts | 2 +- .../Signup/StepCaptcha/CaptchaWebView.tsx | 2 +- src/screens/Signup/StepInfo/Policies.tsx | 2 +- src/screens/Signup/StepInfo/index.tsx | 2 +- src/state/queries/postgate/index.ts | 2 +- src/state/shell/index.tsx | 2 - src/view/com/composer/Composer.tsx | 2 +- .../com/composer/photos/EditImageDialog.tsx | 2 - .../composer/photos/EditImageDialog.web.tsx | 2 +- src/view/com/feeds/FeedPage.tsx | 9 ++- src/view/com/home/HomeHeaderLayout.web.tsx | 3 +- src/view/com/home/HomeHeaderLayoutMobile.tsx | 1 + src/view/com/lists/ListMembers.tsx | 2 +- src/view/com/lists/MyLists.tsx | 10 +-- .../notifications/NotificationFeedItem.tsx | 2 +- src/view/com/pager/Pager.tsx | 1 + src/view/com/pager/Pager.web.tsx | 1 + src/view/com/pager/PagerWithHeader.tsx | 2 +- src/view/com/pager/PagerWithHeader.web.tsx | 11 +++- src/view/com/pager/TabBar.web.tsx | 4 +- src/view/com/posts/PostFeed.tsx | 10 ++- src/view/com/util/EventStopper.tsx | 1 - src/view/com/util/Link.tsx | 2 +- src/view/com/util/List.tsx | 2 +- src/view/com/util/List.web.tsx | 19 ++++-- src/view/com/util/PostMeta.tsx | 1 - src/view/com/util/TimeElapsed.tsx | 4 +- src/view/com/util/ViewHeader.tsx | 2 + src/view/com/util/ViewSelector.tsx | 8 +-- src/view/com/util/fab/FABInner.tsx | 4 +- .../com/util/forms/NativeDropdown.web.tsx | 2 +- src/view/com/util/images/Gallery.tsx | 1 - src/view/screens/Storybook/Dialogs.tsx | 2 +- src/view/shell/Drawer.tsx | 2 +- src/view/shell/bottom-bar/BottomBar.tsx | 2 +- src/view/shell/bottom-bar/BottomBarWeb.tsx | 2 +- src/view/shell/desktop/LeftNav.tsx | 2 +- yarn.lock | 63 +++++++------------ 73 files changed, 157 insertions(+), 143 deletions(-) create mode 100644 patches/@discord+bottom-sheet+4.6.1.patch diff --git a/package.json b/package.json index fbc41ad87..aa613216d 100644 --- a/package.json +++ b/package.json @@ -213,7 +213,7 @@ "react-native-web-webview": "^1.0.2", "react-native-webview": "^13.13.5", "react-remove-scroll-bar": "^2.3.8", - "react-responsive": "^9.0.2", + "react-responsive": "^10.0.1", "react-textarea-autosize": "^8.5.3", "sonner": "^2.0.7", "sonner-native": "^0.21.0", @@ -245,8 +245,8 @@ "@types/lodash.isequal": "^4.5.6", "@types/lodash.shuffle": "^4.2.7", "@types/psl": "^1.1.1", - "@types/react-dom": "^19.1.2", - "@types/react-responsive": "^8.0.5", + "@types/react": "^19.1.12", + "@types/react-dom": "^19.1.8", "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^7.18.0", "babel-jest": "^29.7.0", @@ -284,7 +284,6 @@ "@expo/image-utils": "0.6.3", "@react-native/babel-preset": "0.79.3", "@react-native/normalize-colors": "0.79.3", - "@types/react": "^18", "**/expo-constants": "17.0.3", "**/expo-device": "7.1.4", "**/zod": "3.23.8", diff --git a/patches/@discord+bottom-sheet+4.6.1.patch b/patches/@discord+bottom-sheet+4.6.1.patch new file mode 100644 index 000000000..e3837d84d --- /dev/null +++ b/patches/@discord+bottom-sheet+4.6.1.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@discord/bottom-sheet/src/hooks/useStableCallback.ts b/node_modules/@discord/bottom-sheet/src/hooks/useStableCallback.ts +index 1c788ab..d30f330 100644 +--- a/node_modules/@discord/bottom-sheet/src/hooks/useStableCallback.ts ++++ b/node_modules/@discord/bottom-sheet/src/hooks/useStableCallback.ts +@@ -6,7 +6,7 @@ type Callback = (...args: any[]) => any; + * https://gist.github.com/JakeCoxon/c7ebf6e6496f8468226fd36b596e1985 + */ + export const useStableCallback = (callback: Callback) => { +- const callbackRef = useRef(); ++ const callbackRef = useRef(undefined); + const memoCallback = useCallback( + (...args: any) => callbackRef.current && callbackRef.current(...args), + [] diff --git a/src/Navigation.tsx b/src/Navigation.tsx index cdc0fc220..003f9c2e8 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -1,4 +1,4 @@ -import {useCallback, useRef} from 'react' +import {type JSX, useCallback, useRef} from 'react' import {Linking} from 'react-native' import * as Notifications from 'expo-notifications' import {i18n, type MessageDescriptor} from '@lingui/core' diff --git a/src/alf/typography.tsx b/src/alf/typography.tsx index a3bed4e4c..c229ab443 100644 --- a/src/alf/typography.tsx +++ b/src/alf/typography.tsx @@ -3,7 +3,6 @@ import {type TextProps as RNTextProps} from 'react-native' import {type StyleProp, type TextStyle} from 'react-native' import {UITextView} from 'react-native-uitextview' import createEmojiRegex from 'emoji-regex' -import type React from 'react' import {isNative} from '#/platform/detection' import {isIOS} from '#/platform/detection' diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 5a0f0c1c7..af5641ab1 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -71,8 +71,8 @@ export type ButtonState = { export type ButtonContext = VariantProps & ButtonState type NonTextElements = - | React.ReactElement - | Iterable + | React.ReactElement + | Iterable | null | undefined | boolean> export type ButtonProps = Pick< PressableProps, diff --git a/src/components/ContextMenu/index.tsx b/src/components/ContextMenu/index.tsx index dd7be13d0..9d7189473 100644 --- a/src/components/ContextMenu/index.tsx +++ b/src/components/ContextMenu/index.tsx @@ -119,7 +119,8 @@ export function Root({children}: {children: React.ReactNode}) { const hoverablesSV = useSharedValue< Record >({}) - const syncHoverablesThrottleRef = useRef>() + const syncHoverablesThrottleRef = + useRef>(undefined) const [hoveredMenuItem, setHoveredMenuItem] = useState(null) const onHoverableTouchUp = useCallback((id: string) => { diff --git a/src/components/ContextMenu/types.ts b/src/components/ContextMenu/types.ts index 265a746ca..13f365e53 100644 --- a/src/components/ContextMenu/types.ts +++ b/src/components/ContextMenu/types.ts @@ -5,7 +5,6 @@ import { type ViewStyle, } from 'react-native' import {type SharedValue} from 'react-native-reanimated' -import type React from 'react' import type * as Dialog from '#/components/Dialog' import { diff --git a/src/components/Dialog/types.ts b/src/components/Dialog/types.ts index 1308e625c..938d7c744 100644 --- a/src/components/Dialog/types.ts +++ b/src/components/Dialog/types.ts @@ -5,7 +5,6 @@ import { type StyleProp, type ViewStyle, } from 'react-native' -import type React from 'react' import {type ViewStyleProp} from '#/alf' import {type BottomSheetViewProps} from '../../../modules/bottom-sheet' @@ -34,7 +33,7 @@ export type DialogControlRefProps = { */ export type DialogControlProps = DialogControlRefProps & { id: string - ref: React.RefObject + ref: React.RefObject isOpen?: boolean } diff --git a/src/components/Lists.tsx b/src/components/Lists.tsx index 311df3bcb..97cb4e710 100644 --- a/src/components/Lists.tsx +++ b/src/components/Lists.tsx @@ -2,7 +2,6 @@ import {memo} from 'react' import {type StyleProp, View, type ViewStyle} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {cleanError} from '#/lib/strings/errors' import {CenteredView} from '#/view/com/util/Views' diff --git a/src/components/Portal.tsx b/src/components/Portal.tsx index b4bebce4d..bbfc8b359 100644 --- a/src/components/Portal.tsx +++ b/src/components/Portal.tsx @@ -10,7 +10,7 @@ import { useState, } from 'react' -type Component = React.ReactElement +type Component = React.ReactElement type ContextType = { outlet: Component | null diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.tsx index 266438c04..52449698c 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb.tsx @@ -139,7 +139,7 @@ function useHLS({ playlist: string setHasSubtitleTrack: (v: boolean) => void setError: (v: Error | null) => void - videoRef: React.RefObject + videoRef: React.RefObject setHlsLoading: (v: boolean) => void }) { const [Hls, setHls] = useState( diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx index 37b44751d..095136944 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx @@ -1,7 +1,6 @@ import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {atoms as a, useTheme} from '#/alf' import {Button, ButtonText} from '#/components/Button' diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/ControlButton.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/ControlButton.tsx index 9b0c963ea..5178b9283 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/ControlButton.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/ControlButton.tsx @@ -1,5 +1,4 @@ import {type SvgProps} from 'react-native-svg' -import type React from 'react' import {PressableWithHover} from '#/view/com/util/PressableWithHover' import {atoms as a, useTheme, web} from '#/alf' diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/Scrubber.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/Scrubber.tsx index e4814462f..39661adef 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/Scrubber.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/Scrubber.tsx @@ -2,7 +2,6 @@ import {useCallback, useEffect, useRef, useState} from 'react' import {View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {isFirefox, isTouchDevice} from '#/lib/browser' import {clamp} from '#/lib/numbers' 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 7a54ef486..78b457ed6 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx @@ -46,14 +46,14 @@ export function Controls({ hlsLoading, hasSubtitleTrack, }: { - videoRef: React.RefObject - hlsRef: React.RefObject + videoRef: React.RefObject + hlsRef: React.RefObject active: boolean setActive: () => void focused: boolean setFocused: (focused: boolean) => void onScreen: boolean - fullscreenRef: React.RefObject + fullscreenRef: React.RefObject hlsLoading: boolean hasSubtitleTrack: boolean }) { @@ -232,7 +232,7 @@ export function Controls({ }, [onSeek, videoRef]) const [showCursor, setShowCursor] = useState(true) - const cursorTimeoutRef = useRef>() + const cursorTimeoutRef = useRef>(undefined) const onPointerMoveEmptySpace = useCallback(() => { setShowCursor(true) if (cursorTimeoutRef.current) { @@ -264,7 +264,7 @@ export function Controls({ [hovered], ) - const timeoutRef = useRef>() + const timeoutRef = useRef>(undefined) const onHoverWithTimeout = useCallback(() => { onHover() diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx index ec5f23fc0..4bb66e17a 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx @@ -3,7 +3,6 @@ import {View} from 'react-native' import Animated, {FadeIn, FadeOut} from 'react-native-reanimated' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {isSafari, isTouchDevice} from '#/lib/browser' import {atoms as a} from '#/alf' diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/utils.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/utils.tsx index db5ae6ac3..c2ebdca51 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/utils.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/utils.tsx @@ -4,7 +4,7 @@ import {isSafari} from '#/lib/browser' import {logger} from '#/logger' import {useVideoVolumeState} from '#/components/Post/Embed/VideoEmbed/VideoVolumeContext' -export function useVideoElement(ref: RefObject) { +export function useVideoElement(ref: RefObject) { const [playing, setPlaying] = useState(false) const [muted, setMuted] = useState(true) const [currentTime, setCurrentTime] = useState(0) diff --git a/src/components/Post/Embed/VideoEmbed/index.web.tsx b/src/components/Post/Embed/VideoEmbed/index.web.tsx index 28341d826..25f9f4604 100644 --- a/src/components/Post/Embed/VideoEmbed/index.web.tsx +++ b/src/components/Post/Embed/VideoEmbed/index.web.tsx @@ -10,7 +10,6 @@ import {View} from 'react-native' import {type AppBskyEmbedVideo} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {isFirefox} from '#/lib/browser' import {ErrorBoundary} from '#/view/com/util/ErrorBoundary' @@ -38,7 +37,7 @@ export function VideoEmbed({ useActiveVideoWeb() const [onScreen, setOnScreen] = useState(false) const [isFullscreen] = useFullscreen() - const lastKnownTime = useRef() + const lastKnownTime = useRef(undefined) useEffect(() => { if (!ref.current) return diff --git a/src/components/PostControls/PostMenu/index.tsx b/src/components/PostControls/PostMenu/index.tsx index 1102aa9a4..950bc4f6d 100644 --- a/src/components/PostControls/PostMenu/index.tsx +++ b/src/components/PostControls/PostMenu/index.tsx @@ -8,7 +8,6 @@ import { } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {type Shadow} from '#/state/cache/post-shadow' import {EventStopper} from '#/view/com/util/EventStopper' diff --git a/src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx b/src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx index d074cdcf0..ac424c37a 100644 --- a/src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx +++ b/src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx @@ -3,7 +3,6 @@ import {AtUri} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' -import type React from 'react' import {makeProfileLink} from '#/lib/routes/links' import {type NavigationProp} from '#/lib/routes/types' diff --git a/src/components/PostControls/ShareMenu/index.tsx b/src/components/PostControls/ShareMenu/index.tsx index 6f59c0d42..6127ca41d 100644 --- a/src/components/PostControls/ShareMenu/index.tsx +++ b/src/components/PostControls/ShareMenu/index.tsx @@ -9,7 +9,6 @@ import { } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {makeProfileLink} from '#/lib/routes/links' import {shareUrl} from '#/lib/sharing' diff --git a/src/components/ProfileHoverCard/types.ts b/src/components/ProfileHoverCard/types.ts index f99254e40..53513c695 100644 --- a/src/components/ProfileHoverCard/types.ts +++ b/src/components/ProfileHoverCard/types.ts @@ -1,5 +1,3 @@ -import type React from 'react' - import {type ViewStyleProp} from '#/alf' export type ProfileHoverCardProps = ViewStyleProp & { diff --git a/src/components/ProgressGuide/FollowDialog.tsx b/src/components/ProgressGuide/FollowDialog.tsx index f2eb4fa3d..c4a5f0fa0 100644 --- a/src/components/ProgressGuide/FollowDialog.tsx +++ b/src/components/ProgressGuide/FollowDialog.tsx @@ -293,8 +293,8 @@ let Header = ({ interestsDisplayNames, }: { guide: Follow10ProgressGuide - inputRef: React.RefObject - listRef: React.RefObject + inputRef: React.RefObject + listRef: React.RefObject onSelectTab: (v: string) => void searchText: string setHeaderHeight: (v: number) => void @@ -565,7 +565,7 @@ function SearchInput({ }: { onChangeText: (text: string) => void onEscape: () => void - inputRef: React.RefObject + inputRef: React.RefObject defaultValue: string }) { const t = useTheme() diff --git a/src/components/ProgressGuide/Toast.tsx b/src/components/ProgressGuide/Toast.tsx index b26c718f8..d4ac771b2 100644 --- a/src/components/ProgressGuide/Toast.tsx +++ b/src/components/ProgressGuide/Toast.tsx @@ -14,7 +14,7 @@ import {useLingui} from '@lingui/react' import {isWeb} from '#/platform/detection' import {atoms as a, useTheme} from '#/alf' import {Portal} from '#/components/Portal' -import {AnimatedCheck, AnimatedCheckRef} from '../anim/AnimatedCheck' +import {AnimatedCheck, type AnimatedCheckRef} from '../anim/AnimatedCheck' import {Text} from '../Typography' export interface ProgressGuideToastRef { @@ -39,7 +39,7 @@ export const ProgressGuideToast = React.forwardRef< const translateY = useSharedValue(0) const opacity = useSharedValue(0) const animatedCheckRef = React.useRef(null) - const timeoutRef = React.useRef() + const timeoutRef = React.useRef(undefined) const winDim = useWindowDimensions() /** diff --git a/src/components/Select/types.ts b/src/components/Select/types.ts index 661621a60..0e58c197b 100644 --- a/src/components/Select/types.ts +++ b/src/components/Select/types.ts @@ -160,7 +160,7 @@ export type ContentProps = { item: T, index: number, selectedValue?: string | null, - ) => React.ReactElement + ) => React.ReactElement /* * Extracts the value from an item. Defaults to `item => item.value` */ diff --git a/src/components/dialogs/GifSelect.tsx b/src/components/dialogs/GifSelect.tsx index fbbc70f11..d26cec2c6 100644 --- a/src/components/dialogs/GifSelect.tsx +++ b/src/components/dialogs/GifSelect.tsx @@ -37,7 +37,7 @@ export function GifSelectDialog({ onClose, onSelectGif: onSelectGifProp, }: { - controlRef: React.RefObject<{open: () => void}> + controlRef: React.RefObject<{open: () => void} | null> onClose?: () => void onSelectGif: (gif: Gif) => void }) { diff --git a/src/components/dialogs/SearchablePeopleList.tsx b/src/components/dialogs/SearchablePeopleList.tsx index 159f623b9..4259f3760 100644 --- a/src/components/dialogs/SearchablePeopleList.tsx +++ b/src/components/dialogs/SearchablePeopleList.tsx @@ -484,7 +484,7 @@ function SearchInput({ value: string onChangeText: (text: string) => void onEscape: () => void - inputRef: React.RefObject + inputRef: React.RefObject }) { const t = useTheme() const {_} = useLingui() diff --git a/src/components/dms/ActionsWrapper.web.tsx b/src/components/dms/ActionsWrapper.web.tsx index 75a9b5278..f45aa4ab9 100644 --- a/src/components/dms/ActionsWrapper.web.tsx +++ b/src/components/dms/ActionsWrapper.web.tsx @@ -3,7 +3,6 @@ import {Pressable, View} from 'react-native' import {type ChatBskyConvoDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {useConvoActive} from '#/state/messages/convo' import {useSession} from '#/state/session' diff --git a/src/components/forms/InputGroup.tsx b/src/components/forms/InputGroup.tsx index 6908d4df8..aacdc60c7 100644 --- a/src/components/forms/InputGroup.tsx +++ b/src/components/forms/InputGroup.tsx @@ -23,9 +23,12 @@ export function InputGroup(props: React.PropsWithChildren<{}>) { {React.cloneElement(child, { // @ts-ignore style: [ + // @ts-ignore ...(Array.isArray(child.props?.style) - ? child.props.style - : [child.props.style || {}]), + ? // @ts-ignore + child.props.style + : // @ts-ignore + [child.props.style || {}]), { borderTopLeftRadius: i > 0 ? 0 : undefined, borderTopRightRadius: i > 0 ? 0 : undefined, diff --git a/src/components/forms/TextField.tsx b/src/components/forms/TextField.tsx index 3d4caa93b..85fb7c481 100644 --- a/src/components/forms/TextField.tsx +++ b/src/components/forms/TextField.tsx @@ -28,7 +28,7 @@ import {type Props as SVGIconProps} from '#/components/icons/common' import {Text} from '#/components/Typography' const Context = createContext<{ - inputRef: React.RefObject | null + inputRef: React.RefObject | null isInvalid: boolean hovered: boolean onHoverIn: () => void @@ -152,7 +152,7 @@ export type InputProps = Omit & { value?: string onChangeText?: (value: string) => void isInvalid?: boolean - inputRef?: React.RefObject | React.ForwardedRef + inputRef?: React.RefObject | React.ForwardedRef } export function createInput(Component: typeof TextInput) { diff --git a/src/components/forms/ToggleButton.tsx b/src/components/forms/ToggleButton.tsx index 8e08665fd..fab9414f5 100644 --- a/src/components/forms/ToggleButton.tsx +++ b/src/components/forms/ToggleButton.tsx @@ -1,5 +1,10 @@ import React from 'react' -import {AccessibilityProps, TextStyle, View, ViewStyle} from 'react-native' +import { + type AccessibilityProps, + type TextStyle, + View, + type ViewStyle, +} from 'react-native' import {atoms as a, native, useTheme} from '#/alf' import * as Toggle from '#/components/forms/Toggle' @@ -7,7 +12,7 @@ import {Text} from '#/components/Typography' type ItemProps = Omit & AccessibilityProps & { - children: React.ReactElement + children: React.ReactElement testID?: string } diff --git a/src/components/hooks/useFullscreen.ts b/src/components/hooks/useFullscreen.ts index 498f22223..cbe3e581c 100644 --- a/src/components/hooks/useFullscreen.ts +++ b/src/components/hooks/useFullscreen.ts @@ -14,7 +14,7 @@ function fullscreenSubscribe(onChange: () => void) { return () => document.removeEventListener('fullscreenchange', onChange) } -export function useFullscreen(ref?: React.RefObject) { +export function useFullscreen(ref?: React.RefObject) { if (!isWeb) throw new Error("'useFullscreen' is a web-only hook") const isFullscreen = useSyncExternalStore(fullscreenSubscribe, () => Boolean(document.fullscreenElement), diff --git a/src/components/moderation/LabelPreference.tsx b/src/components/moderation/LabelPreference.tsx index edbb12d0c..f477792d1 100644 --- a/src/components/moderation/LabelPreference.tsx +++ b/src/components/moderation/LabelPreference.tsx @@ -5,7 +5,6 @@ import { } from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {useGlobalLabelStrings} from '#/lib/moderation/useGlobalLabelStrings' import {useLabelBehaviorDescription} from '#/lib/moderation/useLabelBehaviorDescription' diff --git a/src/lib/hooks/useAnimatedValue.ts b/src/lib/hooks/useAnimatedValue.ts index 1307ef952..9ae14dab6 100644 --- a/src/lib/hooks/useAnimatedValue.ts +++ b/src/lib/hooks/useAnimatedValue.ts @@ -2,7 +2,7 @@ import * as React from 'react' import {Animated} from 'react-native' export function useAnimatedValue(initialValue: number) { - const lazyRef = React.useRef() + const lazyRef = React.useRef(undefined) if (lazyRef.current === undefined) { lazyRef.current = new Animated.Value(initialValue) diff --git a/src/lib/hooks/useOTAUpdates.ts b/src/lib/hooks/useOTAUpdates.ts index ba46b6055..9c5750606 100644 --- a/src/lib/hooks/useOTAUpdates.ts +++ b/src/lib/hooks/useOTAUpdates.ts @@ -127,7 +127,7 @@ export function useOTAUpdates() { const appState = React.useRef('active') const lastMinimize = React.useRef(0) const ranInitialCheck = React.useRef(false) - const timeout = React.useRef() + const timeout = React.useRef(undefined) const {currentlyRunning, isUpdatePending} = useUpdates() const currentChannel = currentlyRunning?.channel diff --git a/src/lib/merge-refs.ts b/src/lib/merge-refs.ts index 4617b5260..b03899547 100644 --- a/src/lib/merge-refs.ts +++ b/src/lib/merge-refs.ts @@ -13,7 +13,7 @@ * returns a ref callback function that can be used to merge multiple refs into a single ref. */ export function mergeRefs( - refs: Array | React.LegacyRef>, + refs: Array | React.Ref>, ): React.RefCallback { return value => { refs.forEach(ref => { diff --git a/src/screens/Signup/StepCaptcha/CaptchaWebView.tsx b/src/screens/Signup/StepCaptcha/CaptchaWebView.tsx index 27951d4cc..f208951d5 100644 --- a/src/screens/Signup/StepCaptcha/CaptchaWebView.tsx +++ b/src/screens/Signup/StepCaptcha/CaptchaWebView.tsx @@ -31,7 +31,7 @@ export function CaptchaWebView({ onError: (error: unknown) => void }) { const startedAt = useRef(Date.now()) - const successTo = useRef() + const successTo = useRef(undefined) useEffect(() => { return () => { diff --git a/src/screens/Signup/StepInfo/Policies.tsx b/src/screens/Signup/StepInfo/Policies.tsx index 36de08f6e..754f15e7e 100644 --- a/src/screens/Signup/StepInfo/Policies.tsx +++ b/src/screens/Signup/StepInfo/Policies.tsx @@ -72,7 +72,7 @@ export const Policies = ({ ) } - let els: ReactElement + let els: ReactElement if (tos && pp) { els = ( diff --git a/src/screens/Signup/StepInfo/index.tsx b/src/screens/Signup/StepInfo/index.tsx index b7db3fb98..842ddadc5 100644 --- a/src/screens/Signup/StepInfo/index.tsx +++ b/src/screens/Signup/StepInfo/index.tsx @@ -60,7 +60,7 @@ export function StepInfo({ const [hasWarnedEmail, setHasWarnedEmail] = React.useState(false) - const tldtsRef = React.useRef() + const tldtsRef = React.useRef(undefined) React.useEffect(() => { // @ts-expect-error - valid path import('tldts/dist/index.cjs.min.js').then(tldts => { diff --git a/src/state/queries/postgate/index.ts b/src/state/queries/postgate/index.ts index 8c86dc017..95eb94f8e 100644 --- a/src/state/queries/postgate/index.ts +++ b/src/state/queries/postgate/index.ts @@ -173,7 +173,7 @@ export function useToggleQuoteDetachmentMutation() { const agent = useAgent() const queryClient = useQueryClient() const getPosts = useGetPosts() - const prevEmbed = React.useRef() + const prevEmbed = React.useRef(undefined) return useMutation({ mutationFn: async ({ diff --git a/src/state/shell/index.tsx b/src/state/shell/index.tsx index 92cf520a3..809a521bf 100644 --- a/src/state/shell/index.tsx +++ b/src/state/shell/index.tsx @@ -1,5 +1,3 @@ -import type React from 'react' - import {Provider as ColorModeProvider} from './color-mode' import {Provider as DrawerOpenProvider} from './drawer-open' import {Provider as DrawerSwipableProvider} from './drawer-swipe-disabled' diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 61715a988..2a9635402 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -174,7 +174,7 @@ export const ComposePost = ({ videoUri: initVideoUri, cancelRef, }: Props & { - cancelRef?: React.RefObject + cancelRef?: React.RefObject }) => { const {currentAccount} = useSession() const agent = useAgent() diff --git a/src/view/com/composer/photos/EditImageDialog.tsx b/src/view/com/composer/photos/EditImageDialog.tsx index 9799f7b82..9a0eb9084 100644 --- a/src/view/com/composer/photos/EditImageDialog.tsx +++ b/src/view/com/composer/photos/EditImageDialog.tsx @@ -1,5 +1,3 @@ -import type React from 'react' - import {type ComposerImage} from '#/state/gallery' import type * as Dialog from '#/components/Dialog' diff --git a/src/view/com/composer/photos/EditImageDialog.web.tsx b/src/view/com/composer/photos/EditImageDialog.web.tsx index 9a170736a..cda4e9ecf 100644 --- a/src/view/com/composer/photos/EditImageDialog.web.tsx +++ b/src/view/com/composer/photos/EditImageDialog.web.tsx @@ -112,7 +112,7 @@ function EditImageInner({ aspectRatio, }: Required> & Omit & { - saveRef: React.RefObject<{save: () => Promise}> + saveRef: React.RefObject<{save: () => Promise} | null> }) { const t = useTheme() const [isDragging, setIsDragging] = useState(false) diff --git a/src/view/com/feeds/FeedPage.tsx b/src/view/com/feeds/FeedPage.tsx index 0f93e66e3..219212232 100644 --- a/src/view/com/feeds/FeedPage.tsx +++ b/src/view/com/feeds/FeedPage.tsx @@ -1,4 +1,11 @@ -import {useCallback, useEffect, useMemo, useRef, useState} from 'react' +import { + type JSX, + useCallback, + useEffect, + useMemo, + useRef, + useState, +} from 'react' import {View} from 'react-native' import {type AppBskyActorDefs, AppBskyFeedDefs} from '@atproto/api' import {msg} from '@lingui/macro' diff --git a/src/view/com/home/HomeHeaderLayout.web.tsx b/src/view/com/home/HomeHeaderLayout.web.tsx index d8bbe19e6..b12ab69b7 100644 --- a/src/view/com/home/HomeHeaderLayout.web.tsx +++ b/src/view/com/home/HomeHeaderLayout.web.tsx @@ -1,7 +1,8 @@ -import React from 'react' +import {type JSX} from 'react' import {View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' +import type React from 'react' import {useKawaiiMode} from '#/state/preferences/kawaii' import {useSession} from '#/state/session' diff --git a/src/view/com/home/HomeHeaderLayoutMobile.tsx b/src/view/com/home/HomeHeaderLayoutMobile.tsx index 7a40604f4..a0d7b3e78 100644 --- a/src/view/com/home/HomeHeaderLayoutMobile.tsx +++ b/src/view/com/home/HomeHeaderLayoutMobile.tsx @@ -1,3 +1,4 @@ +import {type JSX} from 'react' import {View} from 'react-native' import Animated from 'react-native-reanimated' import {msg} from '@lingui/macro' diff --git a/src/view/com/lists/ListMembers.tsx b/src/view/com/lists/ListMembers.tsx index 541c8abf9..0771dcd4b 100644 --- a/src/view/com/lists/ListMembers.tsx +++ b/src/view/com/lists/ListMembers.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import React, {type JSX, useCallback} from 'react' import { Dimensions, type GestureResponderEvent, diff --git a/src/view/com/lists/MyLists.tsx b/src/view/com/lists/MyLists.tsx index 5f94946e8..18110b8ba 100644 --- a/src/view/com/lists/MyLists.tsx +++ b/src/view/com/lists/MyLists.tsx @@ -1,13 +1,13 @@ -import React from 'react' +import React, {type JSX} from 'react' import { ActivityIndicator, FlatList as RNFlatList, RefreshControl, - StyleProp, + type StyleProp, View, - ViewStyle, + type ViewStyle, } from 'react-native' -import {AppBskyGraphDefs as GraphDefs} from '@atproto/api' +import {type AppBskyGraphDefs as GraphDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -16,7 +16,7 @@ import {cleanError} from '#/lib/strings/errors' import {s} from '#/lib/styles' import {logger} from '#/logger' import {useModerationOpts} from '#/state/preferences/moderation-opts' -import {MyListsFilter, useMyListsQuery} from '#/state/queries/my-lists' +import {type MyListsFilter, useMyListsQuery} from '#/state/queries/my-lists' import {atoms as a, useTheme} from '#/alf' import {BulletList_Stroke2_Corner0_Rounded as ListIcon} from '#/components/icons/BulletList' import * as ListCard from '#/components/ListCard' diff --git a/src/view/com/notifications/NotificationFeedItem.tsx b/src/view/com/notifications/NotificationFeedItem.tsx index ce774e888..32e7a04df 100644 --- a/src/view/com/notifications/NotificationFeedItem.tsx +++ b/src/view/com/notifications/NotificationFeedItem.tsx @@ -248,7 +248,7 @@ let NotificationFeedItem = ({ : '' let a11yLabel = '' - let notificationContent: ReactElement + let notificationContent: ReactElement let icon = ( (itemRefs.current[i] = node as any)} + ref={node => { + itemRefs.current[i] = node as any + }} style={styles.item} hoverStyle={t.atoms.bg_contrast_25} onPress={() => onPressItem(i)} diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx index 34ebc06fa..fe6351cd4 100644 --- a/src/view/com/posts/PostFeed.tsx +++ b/src/view/com/posts/PostFeed.tsx @@ -1,4 +1,12 @@ -import {memo, useCallback, useEffect, useMemo, useRef, useState} from 'react' +import { + type JSX, + memo, + useCallback, + useEffect, + useMemo, + useRef, + useState, +} from 'react' import { ActivityIndicator, AppState, diff --git a/src/view/com/util/EventStopper.tsx b/src/view/com/util/EventStopper.tsx index 24bc47afd..fe81ac4c8 100644 --- a/src/view/com/util/EventStopper.tsx +++ b/src/view/com/util/EventStopper.tsx @@ -1,5 +1,4 @@ import {View, type ViewStyle} from 'react-native' -import type React from 'react' /** * This utility function captures events and stops diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx index 33f9b41d8..3f345c74c 100644 --- a/src/view/com/util/Link.tsx +++ b/src/view/com/util/Link.tsx @@ -1,4 +1,4 @@ -import {memo, useCallback, useMemo} from 'react' +import {type JSX, memo, useCallback, useMemo} from 'react' import { type GestureResponderEvent, Platform, diff --git a/src/view/com/util/List.tsx b/src/view/com/util/List.tsx index 7dd04bab3..b4b05a00b 100644 --- a/src/view/com/util/List.tsx +++ b/src/view/com/util/List.tsx @@ -57,7 +57,7 @@ let List = React.forwardRef( ...props }, ref, - ): React.ReactElement => { + ): React.ReactElement => { const isScrolledDown = useSharedValue(false) const t = useTheme() const dedupe = useDedupe(400) diff --git a/src/view/com/util/List.web.tsx b/src/view/com/util/List.web.tsx index 55dafb3dd..584738eea 100644 --- a/src/view/com/util/List.web.tsx +++ b/src/view/com/util/List.web.tsx @@ -1,4 +1,10 @@ -import React, {isValidElement, memo, startTransition, useRef} from 'react' +import React, { + isValidElement, + type JSX, + memo, + startTransition, + useRef, +} from 'react' import { type FlatListProps, StyleSheet, @@ -202,6 +208,7 @@ function ListImpl( behavior: animated ? 'smooth' : 'instant', }) }, + scrollToEnd({animated = true}: {animated?: boolean}) { const element = getScrollableNode() element?.scrollTo({ @@ -382,10 +389,10 @@ function EdgeVisibility({ containerRef, onVisibleChange, }: { - root?: React.RefObject | null + root?: React.RefObject | null topMargin?: string bottomMargin?: string - containerRef: React.RefObject + containerRef: React.RefObject onVisibleChange: (isVisible: boolean) => void }) { const [containerHeight, setContainerHeight] = React.useState(0) @@ -404,7 +411,7 @@ function EdgeVisibility({ } function useResizeObserver( - ref: React.RefObject, + ref: React.RefObject, onResize: undefined | ((w: number, h: number) => void), ) { const handleResize = useNonReactiveCallback(onResize ?? (() => {})) @@ -509,7 +516,7 @@ let Visibility = ({ onVisibleChange, style, }: { - root?: React.RefObject | null + root?: React.RefObject | null topMargin?: string bottomMargin?: string onVisibleChange: (isVisible: boolean) => void @@ -551,7 +558,7 @@ Visibility = React.memo(Visibility) export const List = memo(React.forwardRef(ListImpl)) as ( props: ListProps & {ref?: React.Ref}, -) => React.ReactElement +) => React.ReactElement // https://stackoverflow.com/questions/7944460/detect-safari-browser diff --git a/src/view/com/util/PostMeta.tsx b/src/view/com/util/PostMeta.tsx index c0feea5d4..80113f421 100644 --- a/src/view/com/util/PostMeta.tsx +++ b/src/view/com/util/PostMeta.tsx @@ -4,7 +4,6 @@ import {type AppBskyActorDefs, type ModerationDecision} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useQueryClient} from '@tanstack/react-query' -import type React from 'react' import {useActorStatus} from '#/lib/actor-status' import {makeProfileLink} from '#/lib/routes/links' diff --git a/src/view/com/util/TimeElapsed.tsx b/src/view/com/util/TimeElapsed.tsx index 70fed222f..146b0d523 100644 --- a/src/view/com/util/TimeElapsed.tsx +++ b/src/view/com/util/TimeElapsed.tsx @@ -1,5 +1,5 @@ -import React from 'react' -import {I18n} from '@lingui/core' +import React, {type JSX} from 'react' +import {type I18n} from '@lingui/core' import {useLingui} from '@lingui/react' import {useGetTimeAgo} from '#/lib/hooks/useTimeAgo' diff --git a/src/view/com/util/ViewHeader.tsx b/src/view/com/util/ViewHeader.tsx index 999ce52bd..4fb5c8b8f 100644 --- a/src/view/com/util/ViewHeader.tsx +++ b/src/view/com/util/ViewHeader.tsx @@ -1,3 +1,5 @@ +import {type JSX} from 'react' + import {Header} from '#/components/Layout' /** diff --git a/src/view/com/util/ViewSelector.tsx b/src/view/com/util/ViewSelector.tsx index b5075707a..fb0e4b155 100644 --- a/src/view/com/util/ViewSelector.tsx +++ b/src/view/com/util/ViewSelector.tsx @@ -1,7 +1,7 @@ -import React, {useEffect, useState} from 'react' +import React, {type JSX, useEffect, useState} from 'react' import { - NativeScrollEvent, - NativeSyntheticEvent, + type NativeScrollEvent, + type NativeSyntheticEvent, Pressable, RefreshControl, ScrollView, @@ -36,7 +36,7 @@ export const ViewSelector = React.forwardRef< renderItem: (item: any) => JSX.Element ListFooterComponent?: | React.ComponentType - | React.ReactElement + | React.ReactElement | null | undefined onSelectView?: (viewIndex: number) => void diff --git a/src/view/com/util/fab/FABInner.tsx b/src/view/com/util/fab/FABInner.tsx index 77e283625..c2d64411a 100644 --- a/src/view/com/util/fab/FABInner.tsx +++ b/src/view/com/util/fab/FABInner.tsx @@ -1,5 +1,5 @@ -import {ComponentProps} from 'react' -import {StyleSheet, TouchableWithoutFeedback} from 'react-native' +import {type ComponentProps, type JSX} from 'react' +import {StyleSheet, type TouchableWithoutFeedback} from 'react-native' import Animated from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {LinearGradient} from 'expo-linear-gradient' diff --git a/src/view/com/util/forms/NativeDropdown.web.tsx b/src/view/com/util/forms/NativeDropdown.web.tsx index 37df48da3..fb490b9ac 100644 --- a/src/view/com/util/forms/NativeDropdown.web.tsx +++ b/src/view/com/util/forms/NativeDropdown.web.tsx @@ -161,7 +161,7 @@ function DropdownContent({ menuRef, }: { items: DropdownItem[] - menuRef: React.RefObject + menuRef: React.RefObject }) { const pal = usePalette('default') const theme = useTheme() diff --git a/src/view/com/util/images/Gallery.tsx b/src/view/com/util/images/Gallery.tsx index 323264ea4..b4bf905ca 100644 --- a/src/view/com/util/images/Gallery.tsx +++ b/src/view/com/util/images/Gallery.tsx @@ -4,7 +4,6 @@ import {Image, type ImageStyle} from 'expo-image' import {type AppBskyEmbedImages} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import type React from 'react' import {type Dimensions} from '#/lib/media/types' import {useLargeAltBadgeEnabled} from '#/state/preferences/large-alt-badge' diff --git a/src/view/screens/Storybook/Dialogs.tsx b/src/view/screens/Storybook/Dialogs.tsx index 4b4d4191f..3c1d4f20b 100644 --- a/src/view/screens/Storybook/Dialogs.tsx +++ b/src/view/screens/Storybook/Dialogs.tsx @@ -22,7 +22,7 @@ export function Dialogs() { React.useState() const [shouldRenderUnmountTest, setShouldRenderUnmountTest] = React.useState(false) - const unmountTestInterval = React.useRef() + const unmountTestInterval = React.useRef(undefined) const onUnmountTestStartPressWithClose = () => { setShouldRenderUnmountTest(true) diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index 4a797e578..832e4fc3a 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -1,4 +1,4 @@ -import React, {type ComponentProps} from 'react' +import React, {type ComponentProps, type JSX} from 'react' import {Linking, ScrollView, TouchableOpacity, View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {msg, Plural, plural, Trans} from '@lingui/macro' diff --git a/src/view/shell/bottom-bar/BottomBar.tsx b/src/view/shell/bottom-bar/BottomBar.tsx index 01aa4afc4..4b596869e 100644 --- a/src/view/shell/bottom-bar/BottomBar.tsx +++ b/src/view/shell/bottom-bar/BottomBar.tsx @@ -1,4 +1,4 @@ -import {useCallback} from 'react' +import {type JSX, useCallback} from 'react' import {type GestureResponderEvent, View} from 'react-native' import Animated from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' diff --git a/src/view/shell/bottom-bar/BottomBarWeb.tsx b/src/view/shell/bottom-bar/BottomBarWeb.tsx index 8dce85cd1..c884673cd 100644 --- a/src/view/shell/bottom-bar/BottomBarWeb.tsx +++ b/src/view/shell/bottom-bar/BottomBarWeb.tsx @@ -230,7 +230,7 @@ export function BottomBarWeb() { } const NavItem: React.FC<{ - children: (props: {isActive: boolean}) => React.ReactChild + children: (props: {isActive: boolean}) => React.ReactNode href: string routeName: string hasNew?: boolean diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index 5c22198c8..b89d77294 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -1,4 +1,4 @@ -import {useCallback, useMemo, useState} from 'react' +import {type JSX, useCallback, useMemo, useState} from 'react' import {StyleSheet, View} from 'react-native' import {type AppBskyActorDefs} from '@atproto/api' import {msg, plural, Trans} from '@lingui/macro' diff --git a/yarn.lock b/yarn.lock index eb92b4ffb..fac7bdb6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7589,11 +7589,6 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/prop-types@*": - version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" - integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== - "@types/psl@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/psl/-/psl-1.1.1.tgz#3ba9e6d4bd2a32652a639fd5df7e539151d0a3b2" @@ -7609,25 +7604,16 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== -"@types/react-dom@^19.1.2": - version "19.1.3" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.3.tgz#3f0c60804441bf34d19f8dd0d44405c0c0e21bfa" - integrity sha512-rJXC08OG0h3W6wDMFxQrZF00Kq6qQvw0djHRdzl3U5DnIERz0MRce3WVc7IS6JYBwtaP/DwYtRRjVlvivNveKg== - -"@types/react-responsive@^8.0.5": - version "8.0.5" - resolved "https://registry.yarnpkg.com/@types/react-responsive/-/react-responsive-8.0.5.tgz#77769862d2a0711434feb972be08e3e6c334440a" - integrity sha512-k3gQJgI87oP5IrVZe//3LKJFnAeFaqqWmmtl5eoYL2H3HqFcIhUaE30kRK1CsW3DHdojZxcVj4ZNc2ClsEu2PA== - dependencies: - "@types/react" "*" +"@types/react-dom@^19.1.8": + version "19.1.9" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.9.tgz#5ab695fce1e804184767932365ae6569c11b4b4b" + integrity sha512-qXRuZaOsAdXKFyOhRBg6Lqqc0yay13vN7KrIg4L7N4aaHN68ma9OK3NE1BoDFgFOTfM7zg+3/8+2n8rLUH3OKQ== -"@types/react@*", "@types/react@^18": - version "18.2.20" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.20.tgz#1605557a83df5c8a2cc4eeb743b3dfc0eb6aaeb2" - integrity sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw== +"@types/react@^19.1.12": + version "19.1.12" + resolved "https://registry.yarnpkg.com/@types/react/-/react-19.1.12.tgz#7bfaa76aabbb0b4fe0493c21a3a7a93d33e8937b" + integrity sha512-cMoR+FoAf/Jyq6+Df2/Z41jISvGZZ2eTlnsaJRptmZ76Caldwy1odD4xTr/gNV9VLj0AWgg/nmkevIyUfIIq5w== dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" csstype "^3.0.2" "@types/retry@0.12.0": @@ -7635,11 +7621,6 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== -"@types/scheduler@*": - version "0.16.3" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" - integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== - "@types/semver@^7.3.12": version "7.5.0" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" @@ -14515,10 +14496,10 @@ marky@^1.2.2: resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.5.tgz#55796b688cbd72390d2d399eaaf1832c9413e3c0" integrity sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q== -matchmediaquery@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/matchmediaquery/-/matchmediaquery-0.3.1.tgz#8247edc47e499ebb7c58f62a9ff9ccf5b815c6d7" - integrity sha512-Hlk20WQHRIm9EE9luN1kjRjYXAQToHOIAHPJn9buxBwuhfTHoKUcX+lXBbxc85DVQfXYbEQ4HcwQdd128E3qHQ== +matchmediaquery@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/matchmediaquery/-/matchmediaquery-0.4.2.tgz#22582bd4ae63ad9f54c53001bba80cbed0f7eafa" + integrity sha512-wrZpoT50ehYOudhDjt/YvUJc6eUzcdFPdmbizfgvswCKNHD1/OBOHYJpHie+HXpu6bSkEGieFMYk6VuutaiRfA== dependencies: css-mediaquery "^0.1.2" @@ -17124,15 +17105,15 @@ react-remove-scroll@^2.6.3: use-callback-ref "^1.3.3" use-sidecar "^1.1.3" -react-responsive@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/react-responsive/-/react-responsive-9.0.2.tgz#34531ca77a61e7a8775714016d21241df7e4205c" - integrity sha512-+4CCab7z8G8glgJoRjAwocsgsv6VA2w7JPxFWHRc7kvz8mec1/K5LutNC2MG28Mn8mu6+bu04XZxHv5gyfT7xQ== +react-responsive@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/react-responsive/-/react-responsive-10.0.1.tgz#293d4d2562da93409861216f0110d146c5676eb3" + integrity sha512-OM5/cRvbtUWEX8le8RCT8scA8y2OPtb0Q/IViEyCEM5FBN8lRrkUOZnu87I88A6njxDldvxG+rLBxWiA7/UM9g== dependencies: hyphenate-style-name "^1.0.0" - matchmediaquery "^0.3.0" + matchmediaquery "^0.4.2" prop-types "^15.6.1" - shallow-equal "^1.2.1" + shallow-equal "^3.1.0" react-server-dom-webpack@~19.0.0: version "19.0.0" @@ -17985,10 +17966,10 @@ sf-symbols-typescript@^1.0.0: resolved "https://registry.yarnpkg.com/sf-symbols-typescript/-/sf-symbols-typescript-1.0.0.tgz#94e9210bf27e7583f9749a0d07bd4f4937ea488f" integrity sha512-DkS7q3nN68dEMb4E18HFPDAvyrjDZK9YAQQF2QxeFu9gp2xRDXFMF8qLJ1EmQ/qeEGQmop4lmMM1WtYJTIcCMw== -shallow-equal@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.2.1.tgz#4c16abfa56043aa20d050324efa68940b0da79da" - integrity sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA== +shallow-equal@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-3.1.0.tgz#e7a54bac629c7f248eff6c2f5b63122ba4320bec" + integrity sha512-pfVOw8QZIXpMbhBWvzBISicvToTiM5WBF1EeAUZDDSb5Dt29yl4AYbyywbJFSEsRUMr7gJaxqCdr4L3tQf9wVg== sharp@^0.33.5: version "0.33.5" -- 2.51.2 From bbc55eb0d7e78a6c5f0a716d95872cad66fb2456 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 9 Sep 2025 18:33:23 +0300 Subject: [PATCH 02/10] clean up language before suggesting (#9006) --- .../composer/select-language/SuggestedLanguage.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/view/com/composer/select-language/SuggestedLanguage.tsx b/src/view/com/composer/select-language/SuggestedLanguage.tsx index 48e2187b8..431787cea 100644 --- a/src/view/com/composer/select-language/SuggestedLanguage.tsx +++ b/src/view/com/composer/select-language/SuggestedLanguage.tsx @@ -1,5 +1,6 @@ import {useEffect, useState} from 'react' import {View} from 'react-native' +import {parseLanguage} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import lande from 'lande' @@ -21,11 +22,12 @@ const cancelIdle = globalThis.cancelIdleCallback || clearTimeout export function SuggestedLanguage({ text, - replyToLanguage, + replyToLanguage: replyToLanguageProp, }: { text: string replyToLanguage?: string }) { + const replyToLanguage = cleanUpLanguage(replyToLanguageProp) const [suggestedLanguage, setSuggestedLanguage] = useState< string | undefined >(text.length === 0 ? replyToLanguage : undefined) @@ -125,3 +127,11 @@ function guessLanguage(text: string): string | undefined { } return code3ToCode2Strict(lang) } + +function cleanUpLanguage(text: string | undefined): string | undefined { + if (!text) { + return undefined + } + + return parseLanguage(text)?.language +} -- 2.51.2 From bb30b592d787870adc4b4d3e5029d8dc3125f7e7 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 9 Sep 2025 18:33:41 +0300 Subject: [PATCH 03/10] Remove `atob` polyfill (#9000) * remove atob polyfill * remove base64-js as a dependency --- package.json | 1 - src/platform/polyfills.ts | 49 --------------------------------------- 2 files changed, 50 deletions(-) diff --git a/package.json b/package.json index aa613216d..9dac7f2d6 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,6 @@ "array.prototype.findlast": "^1.2.3", "await-lock": "^2.2.2", "babel-plugin-transform-remove-console": "^6.9.4", - "base64-js": "^1.5.1", "bcp-47": "^2.1.0", "bcp-47-match": "^2.0.3", "date-fns": "^2.30.0", diff --git a/src/platform/polyfills.ts b/src/platform/polyfills.ts index bb1763006..aba06c59f 100644 --- a/src/platform/polyfills.ts +++ b/src/platform/polyfills.ts @@ -1,52 +1,3 @@ import 'react-native-url-polyfill/auto' import 'fast-text-encoding' export {} - -/** -https://github.com/MaxArt2501/base64-js -The MIT License (MIT) -Copyright (c) 2014 MaxArt2501 - */ - -const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' -// Regular expression to check formal correctness of base64 encoded strings -const b64re = - /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/ - -globalThis.atob = (str: string): string => { - // atob can work with strings with whitespaces, even inside the encoded part, - // but only \t, \n, \f, \r and ' ', which can be stripped. - str = String(str).replace(/[\t\n\f\r ]+/g, '') - if (!b64re.test(str)) { - throw new TypeError( - "Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.", - ) - } - - // Adding the padding if missing, for simplicity - str += '=='.slice(2 - (str.length & 3)) - var bitmap, - result = '', - r1, - r2, - i = 0 - for (; i < str.length; ) { - bitmap = - (b64.indexOf(str.charAt(i++)) << 18) | - (b64.indexOf(str.charAt(i++)) << 12) | - ((r1 = b64.indexOf(str.charAt(i++))) << 6) | - (r2 = b64.indexOf(str.charAt(i++))) - - result += - 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, - ) - } - return result -} -- 2.51.2 From 53e43a957c2e0f3f020c34653cbf5029ec6dd8bb Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 9 Sep 2025 18:38:21 +0300 Subject: [PATCH 04/10] run `yarn lint --fix` (#9013) --- src/Splash.tsx | 2 +- src/alf/themes.ts | 2 +- src/alf/types.ts | 2 +- src/alf/util/themeSelector.ts | 2 +- src/alf/util/useColorModeTheme.ts | 4 ++-- src/alf/util/useGutters.ts | 2 +- src/components/Dialog/utils.ts | 2 +- src/components/Fill.tsx | 4 ++-- src/components/GradientFill.tsx | 2 +- src/components/IconCircle.tsx | 8 ++++---- src/components/LabelingServiceCard/index.tsx | 8 ++++---- src/components/LikedByList.tsx | 2 +- src/components/LinearGradientBackground.tsx | 4 ++-- src/components/Loader.tsx | 2 +- src/components/Loader.web.tsx | 2 +- src/components/MediaInsetBorder.tsx | 4 ++-- src/components/Menu/types.ts | 16 ++++++++-------- src/components/NewskieDialog.tsx | 2 +- src/components/Pills.tsx | 4 ++-- src/components/ProgressGuide/List.tsx | 2 +- .../ReportDialog/SelectLabelerView.tsx | 4 ++-- .../ReportDialog/SelectReportOptionView.tsx | 9 ++++++--- src/components/ReportDialog/SubmitView.tsx | 6 +++--- src/components/ReportDialog/index.tsx | 8 ++++---- src/components/ReportDialog/types.ts | 2 +- src/components/RichTextTag.tsx | 4 ++-- src/components/StarterPack/Main/PostsList.tsx | 6 +++--- .../StarterPack/Main/ProfilesList.tsx | 17 ++++++++++------- src/components/StarterPack/QrCode.tsx | 2 +- .../StarterPack/Wizard/ScreenTransition.tsx | 4 ++-- src/components/SubtleWebHover.tsx | 2 +- src/components/TrendingTopics.tsx | 8 ++++---- src/components/VideoPostCard.tsx | 8 ++++---- src/components/anim/AnimatedCheck.tsx | 2 +- src/components/dialogs/Embed.tsx | 2 +- src/components/dialogs/MutedWords.tsx | 4 ++-- src/components/dms/BlockedByListDialog.tsx | 4 ++-- src/components/dms/LeaveConvoPrompt.tsx | 4 ++-- .../dms/MessagesListBlockedFooter.tsx | 4 ++-- src/components/dms/ReportConversationPrompt.tsx | 2 +- src/components/feeds/PostFeedVideoGridRow.tsx | 4 ++-- src/components/forms/DateField/index.web.tsx | 4 ++-- src/components/forms/SearchInput.tsx | 2 +- src/components/hooks/useFollowMethods.ts | 6 +++--- src/components/icons/TEMPLATE.tsx | 2 +- .../intents/VerifyEmailIntentDialog.tsx | 2 +- src/components/moderation/LabelsOnMe.tsx | 11 ++++++++--- src/components/moderation/LabelsOnMeDialog.tsx | 2 +- .../moderation/ModerationDetailsDialog.tsx | 4 ++-- src/components/moderation/PostAlerts.tsx | 4 ++-- .../moderation/ProfileHeaderAlerts.tsx | 4 ++-- .../moderation/ReportDialog/action.ts | 10 +++++----- src/components/moderation/ReportDialog/copy.ts | 2 +- src/components/moderation/ReportDialog/state.ts | 4 ++-- src/components/moderation/ReportDialog/types.ts | 12 ++++++------ .../ReportDialog/utils/parseReportSubject.ts | 4 ++-- src/components/moderation/ScreenHider.tsx | 8 ++++---- src/lib/api/feed/custom.ts | 6 +++--- src/lib/api/feed/following.ts | 4 ++-- src/lib/api/feed/likes.ts | 8 ++++---- src/lib/api/feed/merge.ts | 16 ++++++++++++---- src/lib/api/feed/types.ts | 2 +- src/lib/api/feed/utils.ts | 2 +- src/lib/api/upload-blob.ts | 2 +- src/lib/api/upload-blob.web.ts | 2 +- src/lib/assets.native.ts | 2 +- src/lib/assets.ts | 2 +- .../custom-animations/GestureActionView.web.tsx | 2 +- src/lib/custom-animations/PressableScale.tsx | 7 ++++++- src/lib/hooks/useAccountSwitcher.ts | 4 ++-- src/lib/hooks/useGoBack.ts | 2 +- src/lib/hooks/useSetTitle.ts | 2 +- src/lib/hooks/useTimeAgo.ts | 2 +- src/lib/hooks/useWebScrollRestoration.ts | 2 +- src/lib/media/video/compress.web.ts | 4 ++-- src/lib/media/video/upload.shared.ts | 4 ++-- src/lib/media/video/upload.ts | 6 +++--- src/lib/media/video/upload.web.ts | 8 ++++---- src/lib/media/video/util.ts | 2 +- src/lib/moderation/blocked-and-muted.ts | 2 +- .../moderation/useLabelBehaviorDescription.ts | 5 ++++- src/lib/moderation/useLabelInfo.ts | 8 ++++---- src/lib/react-query.tsx | 7 ++++--- src/lib/routes/helpers.ts | 4 ++-- src/lib/strings/display-names.ts | 2 +- src/lib/strings/rich-text-helpers.ts | 2 +- src/lib/strings/rich-text-manip.ts | 2 +- src/lib/strings/time.ts | 2 +- src/lib/themes.ts | 2 +- src/locale/deviceLocales.ts | 2 +- src/locale/i18nProvider.tsx | 2 +- src/logger/__tests__/logDump.test.ts | 2 +- src/logger/logDump.ts | 2 +- src/logger/transports/bitdrift.ts | 2 +- src/logger/transports/console.ts | 2 +- src/logger/util.ts | 2 +- src/screens/Home/NoFeedsPinned.tsx | 2 +- src/screens/List/ListHiddenScreen.tsx | 2 +- src/screens/Login/ChooseAccountForm.tsx | 2 +- src/screens/Login/FormContainer.tsx | 2 +- src/screens/Login/ScreenTransition.tsx | 4 ++-- .../Messages/components/ChatStatusInfo.tsx | 2 +- .../Messages/components/MessageInputEmbed.tsx | 7 +++++-- .../Messages/components/MessageListError.tsx | 2 +- .../ModerationInteractionSettings/index.tsx | 2 +- .../Onboarding/StepInterests/InterestButton.tsx | 2 +- .../StepProfile/AvatarCreatorCircle.tsx | 2 +- .../StepProfile/AvatarCreatorItems.tsx | 6 +++--- src/screens/Post/PostLikedBy.tsx | 5 ++++- src/screens/Post/PostQuotes.tsx | 5 ++++- src/screens/Post/PostRepostedBy.tsx | 5 ++++- src/screens/Profile/ErrorState.tsx | 2 +- src/screens/Profile/Header/DisplayName.tsx | 4 ++-- src/screens/Profile/Header/GrowableAvatar.tsx | 6 +++--- src/screens/Profile/Header/GrowableBanner.tsx | 5 +++-- src/screens/Profile/Header/Metrics.tsx | 4 ++-- src/screens/Profile/Header/StatusBarShadow.tsx | 5 ++++- src/screens/Profile/Header/index.tsx | 10 +++++----- src/screens/Profile/KnownFollowers.tsx | 7 +++++-- src/screens/Profile/ProfileFollowers.tsx | 5 ++++- src/screens/Profile/ProfileFollows.tsx | 5 ++++- src/screens/Profile/ProfileLabelerLikedBy.tsx | 5 ++++- .../Settings/AppIconSettings/AppIconImage.tsx | 2 +- .../components/AddAppPasswordDialog.tsx | 2 +- src/screens/Settings/components/CopyButton.tsx | 4 ++-- .../components/DeactivateAccountDialog.tsx | 2 +- src/screens/Settings/components/PwiOptOut.tsx | 2 +- src/screens/StarterPack/Wizard/StepFeeds.tsx | 4 ++-- src/screens/StarterPack/Wizard/StepProfiles.tsx | 6 +++--- src/screens/VideoFeed/components/Header.tsx | 8 ++++---- src/screens/VideoFeed/types.ts | 2 +- src/state/messages/convo/util.ts | 10 +++++----- src/state/messages/events/types.ts | 2 +- src/state/messages/index.tsx | 2 +- src/state/persisted/index.web.ts | 4 ++-- src/state/persisted/types.ts | 2 +- src/state/persisted/util.ts | 2 +- src/state/preferences/index.tsx | 2 +- src/state/queries/actor-autocomplete.ts | 6 +++++- src/state/queries/app-passwords.ts | 2 +- src/state/queries/invites.ts | 2 +- src/state/queries/known-followers.ts | 11 +++++++---- src/state/queries/my-blocked-accounts.ts | 8 ++++---- src/state/queries/my-lists.ts | 4 ++-- src/state/queries/my-muted-accounts.ts | 8 ++++---- src/state/queries/nuxs/types.ts | 2 +- src/state/queries/nuxs/util.ts | 6 +++--- src/state/queries/post-interaction-settings.ts | 2 +- src/state/queries/post-liked-by.ts | 8 ++++---- src/state/queries/post-quotes.ts | 12 ++++++------ src/state/queries/post-reposted-by.ts | 11 +++++++---- src/state/queries/preferences/types.ts | 6 +++--- src/state/queries/profile-feedgens.ts | 11 +++++++++-- src/state/queries/profile-followers.ts | 11 +++++++---- src/state/queries/profile-follows.ts | 8 ++++---- src/state/queries/profile-lists.ts | 8 ++++++-- src/state/queries/resolve-link.ts | 8 ++++---- src/state/queries/resolve-uri.ts | 6 +++++- src/state/queries/search-posts.ts | 12 ++++++------ src/state/queries/suggested-feeds.ts | 8 ++++++-- src/state/queries/threadgate/index.ts | 6 +++--- src/state/queries/threadgate/util.ts | 4 ++-- src/state/queries/unstable-profile-cache.ts | 4 ++-- src/state/queries/util.ts | 12 ++++++++---- src/state/session/__tests__/session-test.ts | 2 +- src/state/session/moderation.ts | 2 +- src/state/session/util.ts | 2 +- src/state/shell/reminders.ts | 2 +- src/types/bsky/index.ts | 2 +- src/types/bsky/post.ts | 2 +- src/view/com/composer/AltTextCounterWrapper.tsx | 2 +- src/view/com/composer/KeyboardAccessory.tsx | 2 +- .../com/composer/char-progress/CharProgress.tsx | 7 ++++++- src/view/com/composer/photos/SelectGifBtn.tsx | 2 +- .../com/composer/text-input/text-input-util.ts | 2 +- .../composer/text-input/web/LinkDecorator.ts | 2 +- .../com/composer/text-input/web/TagDecorator.ts | 2 +- .../com/composer/threadgate/ThreadgateBtn.tsx | 8 ++++---- .../com/composer/videos/SubtitleFilePicker.tsx | 3 ++- .../com/composer/videos/VideoPreview.web.tsx | 4 ++-- .../composer/videos/VideoTranscodeProgress.tsx | 2 +- src/view/com/composer/videos/pickVideo.web.ts | 2 +- .../com/lightbox/ImageViewing/@types/index.ts | 4 ++-- .../components/ImageDefaultHeader.tsx | 2 +- .../components/ImageItem/ImageItem.android.tsx | 14 +++++++------- .../components/ImageItem/ImageItem.ios.tsx | 10 +++++----- .../components/ImageItem/ImageItem.tsx | 12 ++++++------ .../com/lightbox/ImageViewing/transforms.ts | 2 +- src/view/com/modals/InviteCodes.tsx | 6 +++--- src/view/com/modals/UserAddRemoveLists.tsx | 4 ++-- src/view/com/post-thread/PostLikedBy.tsx | 2 +- src/view/com/post-thread/PostQuotes.tsx | 4 ++-- src/view/com/post-thread/PostRepostedBy.tsx | 2 +- src/view/com/posts/CustomFeedEmptyState.tsx | 4 ++-- src/view/com/posts/FollowingEmptyState.tsx | 4 ++-- src/view/com/posts/FollowingEndOfFeed.tsx | 4 ++-- src/view/com/profile/ProfileFollowers.tsx | 2 +- src/view/com/profile/ProfileFollows.tsx | 2 +- src/view/com/util/Alert.web.tsx | 2 +- src/view/com/util/BottomSheetCustomBackdrop.tsx | 5 +++-- src/view/com/util/EmptyState.tsx | 6 +++--- src/view/com/util/EmptyStateWithButton.tsx | 4 ++-- src/view/com/util/ErrorBoundary.tsx | 4 ++-- src/view/com/util/FeedInfoText.tsx | 4 ++-- src/view/com/util/LoadMoreRetryBtn.tsx | 2 +- src/view/com/util/MainScrollProvider.tsx | 2 +- src/view/com/util/PressableWithHover.tsx | 11 ++++++++--- src/view/com/util/Views.tsx | 6 +++--- src/view/com/util/WebAuxClickWrapper.tsx | 2 +- src/view/com/util/error/ErrorMessage.tsx | 6 +++--- src/view/com/util/error/ErrorScreen.tsx | 2 +- src/view/com/util/fab/FAB.web.tsx | 2 +- src/view/com/util/images/Image.tsx | 2 +- src/view/com/util/layouts/LoggedOutLayout.tsx | 2 +- src/view/icons/Logo.tsx | 6 +++--- src/view/icons/Logomark.tsx | 2 +- src/view/icons/Logotype.tsx | 2 +- src/view/screens/CommunityGuidelines.tsx | 5 ++++- src/view/screens/CopyrightPolicy.tsx | 5 ++++- src/view/screens/NotFound.tsx | 2 +- src/view/screens/PrivacyPolicy.tsx | 5 ++++- src/view/screens/ProfileFeedLikedBy.tsx | 5 ++++- src/view/screens/Storybook/ListContained.tsx | 2 +- src/view/screens/Support.tsx | 5 ++++- src/view/screens/TermsOfService.tsx | 5 ++++- 225 files changed, 555 insertions(+), 433 deletions(-) diff --git a/src/Splash.tsx b/src/Splash.tsx index c31723aaa..47e70b375 100644 --- a/src/Splash.tsx +++ b/src/Splash.tsx @@ -15,7 +15,7 @@ import Animated, { withTiming, } from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' -import Svg, {Path, SvgProps} from 'react-native-svg' +import Svg, {Path, type SvgProps} from 'react-native-svg' import {Image} from 'expo-image' import * as SplashScreen from 'expo-splash-screen' diff --git a/src/alf/themes.ts b/src/alf/themes.ts index 82b2e1b40..bb3c62c49 100644 --- a/src/alf/themes.ts +++ b/src/alf/themes.ts @@ -1,5 +1,5 @@ import {atoms} from '#/alf/atoms' -import {Palette, Theme} from '#/alf/types' +import {type Palette, type Theme} from '#/alf/types' import { BLUE_HUE, defaultScale, diff --git a/src/alf/types.ts b/src/alf/types.ts index 5bac690e2..d2ac5dbaa 100644 --- a/src/alf/types.ts +++ b/src/alf/types.ts @@ -1,4 +1,4 @@ -import {StyleProp, TextStyle, ViewStyle} from 'react-native' +import {type StyleProp, type TextStyle, type ViewStyle} from 'react-native' export type TextStyleProp = { style?: StyleProp diff --git a/src/alf/util/themeSelector.ts b/src/alf/util/themeSelector.ts index e79f86387..c118b6506 100644 --- a/src/alf/util/themeSelector.ts +++ b/src/alf/util/themeSelector.ts @@ -1,4 +1,4 @@ -import {ThemeName} from '#/alf/types' +import {type ThemeName} from '#/alf/types' export function select(name: ThemeName, options: Record) { switch (name) { diff --git a/src/alf/util/useColorModeTheme.ts b/src/alf/util/useColorModeTheme.ts index 561a504b2..b0b4f9e7c 100644 --- a/src/alf/util/useColorModeTheme.ts +++ b/src/alf/util/useColorModeTheme.ts @@ -1,10 +1,10 @@ import React from 'react' -import {ColorSchemeName, useColorScheme} from 'react-native' +import {type ColorSchemeName, useColorScheme} from 'react-native' import {isWeb} from '#/platform/detection' import {useThemePrefs} from '#/state/shell' import {dark, dim, light} from '#/alf/themes' -import {ThemeName} from '#/alf/types' +import {type ThemeName} from '#/alf/types' export function useColorModeTheme(): ThemeName { const theme = useThemeName() diff --git a/src/alf/util/useGutters.ts b/src/alf/util/useGutters.ts index 57dd4e80b..265d0f23c 100644 --- a/src/alf/util/useGutters.ts +++ b/src/alf/util/useGutters.ts @@ -1,6 +1,6 @@ import React from 'react' -import {Breakpoint, useBreakpoints} from '#/alf/breakpoints' +import {type Breakpoint, useBreakpoints} from '#/alf/breakpoints' import * as tokens from '#/alf/tokens' type Gutter = 'compact' | 'base' | 'wide' | 0 diff --git a/src/components/Dialog/utils.ts b/src/components/Dialog/utils.ts index 058d6e804..812e8cca1 100644 --- a/src/components/Dialog/utils.ts +++ b/src/components/Dialog/utils.ts @@ -1,6 +1,6 @@ import React from 'react' -import {DialogControlProps} from '#/components/Dialog/types' +import {type DialogControlProps} from '#/components/Dialog/types' export function useAutoOpen(control: DialogControlProps, showTimeout?: number) { React.useEffect(() => { diff --git a/src/components/Fill.tsx b/src/components/Fill.tsx index ac74f1660..8ad352473 100644 --- a/src/components/Fill.tsx +++ b/src/components/Fill.tsx @@ -1,7 +1,7 @@ -import React from 'react' import {View} from 'react-native' +import type React from 'react' -import {atoms as a, ViewStyleProp} from '#/alf' +import {atoms as a, type ViewStyleProp} from '#/alf' export function Fill({ children, diff --git a/src/components/GradientFill.tsx b/src/components/GradientFill.tsx index 9ad6ed7dc..863988171 100644 --- a/src/components/GradientFill.tsx +++ b/src/components/GradientFill.tsx @@ -1,6 +1,6 @@ import {LinearGradient} from 'expo-linear-gradient' -import {atoms as a, tokens, ViewStyleProp} from '#/alf' +import {atoms as a, type tokens, type ViewStyleProp} from '#/alf' export function GradientFill({ gradient, diff --git a/src/components/IconCircle.tsx b/src/components/IconCircle.tsx index 2119c9f8d..286dc2837 100644 --- a/src/components/IconCircle.tsx +++ b/src/components/IconCircle.tsx @@ -3,12 +3,12 @@ import {View} from 'react-native' import { atoms as a, flatten, - TextStyleProp, + type TextStyleProp, useTheme, - ViewStyleProp, + type ViewStyleProp, } from '#/alf' -import {Props} from '#/components/icons/common' -import {Growth_Stroke2_Corner0_Rounded as Growth} from '#/components/icons/Growth' +import {type Props} from '#/components/icons/common' +import {type Growth_Stroke2_Corner0_Rounded as Growth} from '#/components/icons/Growth' export function IconCircle({ icon: Icon, diff --git a/src/components/LabelingServiceCard/index.tsx b/src/components/LabelingServiceCard/index.tsx index b144c1dc8..990dbb1c6 100644 --- a/src/components/LabelingServiceCard/index.tsx +++ b/src/components/LabelingServiceCard/index.tsx @@ -1,16 +1,16 @@ -import React from 'react' import {View} from 'react-native' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' +import type React from 'react' import {getLabelingServiceTitle} from '#/lib/moderation' import {sanitizeHandle} from '#/lib/strings/handles' import {useLabelerInfoQuery} from '#/state/queries/labeler' import {UserAvatar} from '#/view/com/util/UserAvatar' -import {atoms as a, useTheme, ViewStyleProp} from '#/alf' +import {atoms as a, useTheme, type ViewStyleProp} from '#/alf' import {Flag_Stroke2_Corner0_Rounded as Flag} from '#/components/icons/Flag' -import {Link as InternalLink, LinkProps} from '#/components/Link' +import {Link as InternalLink, type LinkProps} from '#/components/Link' import {RichText} from '#/components/RichText' import {Text} from '#/components/Typography' import {ChevronRight_Stroke2_Corner0_Rounded as ChevronRight} from '../icons/Chevron' diff --git a/src/components/LikedByList.tsx b/src/components/LikedByList.tsx index b369bd76e..bd4a9f551 100644 --- a/src/components/LikedByList.tsx +++ b/src/components/LikedByList.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {AppBskyFeedGetLikes as GetLikes} from '@atproto/api' +import {type AppBskyFeedGetLikes as GetLikes} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/LinearGradientBackground.tsx b/src/components/LinearGradientBackground.tsx index 9b28b897c..b208f3ff3 100644 --- a/src/components/LinearGradientBackground.tsx +++ b/src/components/LinearGradientBackground.tsx @@ -1,6 +1,6 @@ -import React from 'react' -import {StyleProp, ViewStyle} from 'react-native' +import {type StyleProp, type ViewStyle} from 'react-native' import {LinearGradient} from 'expo-linear-gradient' +import type React from 'react' import {gradients} from '#/alf/tokens' diff --git a/src/components/Loader.tsx b/src/components/Loader.tsx index 149554912..21970c278 100644 --- a/src/components/Loader.tsx +++ b/src/components/Loader.tsx @@ -8,7 +8,7 @@ import Animated, { } from 'react-native-reanimated' import {atoms as a, flatten, useTheme} from '#/alf' -import {Props, useCommonSVGProps} from '#/components/icons/common' +import {type Props, useCommonSVGProps} from '#/components/icons/common' import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader' export function Loader(props: Props) { diff --git a/src/components/Loader.web.tsx b/src/components/Loader.web.tsx index acf0acfc4..5eefeb109 100644 --- a/src/components/Loader.web.tsx +++ b/src/components/Loader.web.tsx @@ -1,7 +1,7 @@ import {View} from 'react-native' import {atoms as a, flatten, useTheme} from '#/alf' -import {Props, useCommonSVGProps} from '#/components/icons/common' +import {type Props, useCommonSVGProps} from '#/components/icons/common' import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader' export function Loader(props: Props) { diff --git a/src/components/MediaInsetBorder.tsx b/src/components/MediaInsetBorder.tsx index ed89880f4..a341a77d3 100644 --- a/src/components/MediaInsetBorder.tsx +++ b/src/components/MediaInsetBorder.tsx @@ -1,6 +1,6 @@ -import React from 'react' +import type React from 'react' -import {atoms as a, useTheme, ViewStyleProp} from '#/alf' +import {atoms as a, useTheme, type ViewStyleProp} from '#/alf' import {Fill} from '#/components/Fill' /** diff --git a/src/components/Menu/types.ts b/src/components/Menu/types.ts index 51baa24df..e9ee082f4 100644 --- a/src/components/Menu/types.ts +++ b/src/components/Menu/types.ts @@ -1,14 +1,14 @@ -import React from 'react' import { - AccessibilityProps, - AccessibilityRole, - GestureResponderEvent, - PressableProps, + type AccessibilityProps, + type AccessibilityRole, + type GestureResponderEvent, + type PressableProps, } from 'react-native' +import type React from 'react' -import {TextStyleProp, ViewStyleProp} from '#/alf' -import * as Dialog from '#/components/Dialog' -import {Props as SVGIconProps} from '#/components/icons/common' +import {type TextStyleProp, type ViewStyleProp} from '#/alf' +import type * as Dialog from '#/components/Dialog' +import {type Props as SVGIconProps} from '#/components/icons/common' export type ContextType = { control: Dialog.DialogOuterProps['control'] diff --git a/src/components/NewskieDialog.tsx b/src/components/NewskieDialog.tsx index accf07a98..0644ba704 100644 --- a/src/components/NewskieDialog.tsx +++ b/src/components/NewskieDialog.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {AppBskyActorDefs, moderateProfile} from '@atproto/api' +import {type AppBskyActorDefs, moderateProfile} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {differenceInSeconds} from 'date-fns' diff --git a/src/components/Pills.tsx b/src/components/Pills.tsx index 3eddf1b9a..550089a80 100644 --- a/src/components/Pills.tsx +++ b/src/components/Pills.tsx @@ -1,11 +1,11 @@ import React from 'react' import {View} from 'react-native' -import {BSKY_LABELER_DID, ModerationCause} from '@atproto/api' +import {BSKY_LABELER_DID, type ModerationCause} from '@atproto/api' import {Trans} from '@lingui/macro' import {useModerationCauseDescription} from '#/lib/moderation/useModerationCauseDescription' import {UserAvatar} from '#/view/com/util/UserAvatar' -import {atoms as a, useTheme, ViewStyleProp} from '#/alf' +import {atoms as a, useTheme, type ViewStyleProp} from '#/alf' import {Button} from '#/components/Button' import { ModerationDetailsDialog, diff --git a/src/components/ProgressGuide/List.tsx b/src/components/ProgressGuide/List.tsx index bbc5a0177..52fc4c27a 100644 --- a/src/components/ProgressGuide/List.tsx +++ b/src/components/ProgressGuide/List.tsx @@ -1,4 +1,4 @@ -import {StyleProp, View, ViewStyle} from 'react-native' +import {type StyleProp, View, type ViewStyle} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/ReportDialog/SelectLabelerView.tsx b/src/components/ReportDialog/SelectLabelerView.tsx index df472241e..be666ced1 100644 --- a/src/components/ReportDialog/SelectLabelerView.tsx +++ b/src/components/ReportDialog/SelectLabelerView.tsx @@ -1,5 +1,5 @@ import {View} from 'react-native' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -9,7 +9,7 @@ import {Button, useButtonContext} from '#/components/Button' import {Divider} from '#/components/Divider' import * as LabelingServiceCard from '#/components/LabelingServiceCard' import {Text} from '#/components/Typography' -import {ReportDialogProps} from './types' +import {type ReportDialogProps} from './types' export function SelectLabelerView({ ...props diff --git a/src/components/ReportDialog/SelectReportOptionView.tsx b/src/components/ReportDialog/SelectReportOptionView.tsx index 92a442cbd..f5165f8f7 100644 --- a/src/components/ReportDialog/SelectReportOptionView.tsx +++ b/src/components/ReportDialog/SelectReportOptionView.tsx @@ -1,10 +1,13 @@ import React from 'react' import {View} from 'react-native' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {ReportOption, useReportOptions} from '#/lib/moderation/useReportOptions' +import { + type ReportOption, + useReportOptions, +} from '#/lib/moderation/useReportOptions' import {Link} from '#/components/Link' import {DMCA_LINK} from '#/components/ReportDialog/const' export {useDialogControl as useReportDialogControl} from '#/components/Dialog' @@ -23,7 +26,7 @@ import { } from '#/components/icons/Chevron' import {SquareArrowTopRight_Stroke2_Corner0_Rounded as SquareArrowTopRight} from '#/components/icons/SquareArrowTopRight' import {Text} from '#/components/Typography' -import {ReportDialogProps} from './types' +import {type ReportDialogProps} from './types' export function SelectReportOptionView(props: { params: ReportDialogProps['params'] diff --git a/src/components/ReportDialog/SubmitView.tsx b/src/components/ReportDialog/SubmitView.tsx index 36bd1d466..418f364a7 100644 --- a/src/components/ReportDialog/SubmitView.tsx +++ b/src/components/ReportDialog/SubmitView.tsx @@ -1,11 +1,11 @@ import React from 'react' import {View} from 'react-native' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {getLabelingServiceTitle} from '#/lib/moderation' -import {ReportOption} from '#/lib/moderation/useReportOptions' +import {type ReportOption} from '#/lib/moderation/useReportOptions' import {isAndroid} from '#/platform/detection' import {useAgent} from '#/state/session' import {CharProgress} from '#/view/com/composer/char-progress/CharProgress' @@ -19,7 +19,7 @@ import {ChevronLeft_Stroke2_Corner0_Rounded as ChevronLeft} from '#/components/i import {PaperPlane_Stroke2_Corner0_Rounded as SendIcon} from '#/components/icons/PaperPlane' import {Loader} from '#/components/Loader' import {Text} from '#/components/Typography' -import {ReportDialogProps} from './types' +import {type ReportDialogProps} from './types' export function SubmitView({ params, diff --git a/src/components/ReportDialog/index.tsx b/src/components/ReportDialog/index.tsx index 4402152ab..2401ab89f 100644 --- a/src/components/ReportDialog/index.tsx +++ b/src/components/ReportDialog/index.tsx @@ -1,14 +1,14 @@ import React from 'react' import {Pressable, View} from 'react-native' -import {ScrollView} from 'react-native-gesture-handler' +import {type ScrollView} from 'react-native-gesture-handler' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {ReportOption} from '#/lib/moderation/useReportOptions' +import {type ReportOption} from '#/lib/moderation/useReportOptions' import {useMyLabelersQuery} from '#/state/queries/preferences' export {useDialogControl as useReportDialogControl} from '#/components/Dialog' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {atoms as a} from '#/alf' import * as Dialog from '#/components/Dialog' @@ -18,7 +18,7 @@ import {Text} from '#/components/Typography' import {SelectLabelerView} from './SelectLabelerView' import {SelectReportOptionView} from './SelectReportOptionView' import {SubmitView} from './SubmitView' -import {ReportDialogProps} from './types' +import {type ReportDialogProps} from './types' export function ReportDialog(props: ReportDialogProps) { return ( diff --git a/src/components/ReportDialog/types.ts b/src/components/ReportDialog/types.ts index 3f43db4a1..ac9a18d6d 100644 --- a/src/components/ReportDialog/types.ts +++ b/src/components/ReportDialog/types.ts @@ -1,4 +1,4 @@ -import * as Dialog from '#/components/Dialog' +import type * as Dialog from '#/components/Dialog' export type ReportDialogProps = { control: Dialog.DialogOuterProps['control'] diff --git a/src/components/RichTextTag.tsx b/src/components/RichTextTag.tsx index 562d44aa6..93d2399be 100644 --- a/src/components/RichTextTag.tsx +++ b/src/components/RichTextTag.tsx @@ -1,10 +1,10 @@ import React from 'react' -import {StyleProp, Text as RNText, TextStyle} from 'react-native' +import {type StyleProp, Text as RNText, type TextStyle} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {isInvalidHandle} from '#/lib/strings/handles' import {isNative, isWeb} from '#/platform/detection' import { diff --git a/src/components/StarterPack/Main/PostsList.tsx b/src/components/StarterPack/Main/PostsList.tsx index f706e0bff..0a17e038e 100644 --- a/src/components/StarterPack/Main/PostsList.tsx +++ b/src/components/StarterPack/Main/PostsList.tsx @@ -4,11 +4,11 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {isNative} from '#/platform/detection' -import {FeedDescriptor} from '#/state/queries/post-feed' +import {type FeedDescriptor} from '#/state/queries/post-feed' import {PostFeed} from '#/view/com/posts/PostFeed' import {EmptyState} from '#/view/com/util/EmptyState' -import {ListRef} from '#/view/com/util/List' -import {SectionRef} from '#/screens/Profile/Sections/types' +import {type ListRef} from '#/view/com/util/List' +import {type SectionRef} from '#/screens/Profile/Sections/types' interface ProfilesListProps { listUri: string diff --git a/src/components/StarterPack/Main/ProfilesList.tsx b/src/components/StarterPack/Main/ProfilesList.tsx index c1c10c76b..a1ddee5af 100644 --- a/src/components/StarterPack/Main/ProfilesList.tsx +++ b/src/components/StarterPack/Main/ProfilesList.tsx @@ -1,12 +1,15 @@ import React, {useCallback} from 'react' -import {ListRenderItemInfo, View} from 'react-native' +import {type ListRenderItemInfo, View} from 'react-native' import { - AppBskyActorDefs, - AppBskyGraphGetList, + type AppBskyActorDefs, + type AppBskyGraphGetList, AtUri, - ModerationOpts, + type ModerationOpts, } from '@atproto/api' -import {InfiniteData, UseInfiniteQueryResult} from '@tanstack/react-query' +import { + type InfiniteData, + type UseInfiniteQueryResult, +} from '@tanstack/react-query' import {useBottomBarOffset} from '#/lib/hooks/useBottomBarOffset' import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' @@ -14,8 +17,8 @@ import {isBlockedOrBlocking} from '#/lib/moderation/blocked-and-muted' import {isNative, isWeb} from '#/platform/detection' import {useAllListMembersQuery} from '#/state/queries/list-members' import {useSession} from '#/state/session' -import {List, ListRef} from '#/view/com/util/List' -import {SectionRef} from '#/screens/Profile/Sections/types' +import {List, type ListRef} from '#/view/com/util/List' +import {type SectionRef} from '#/screens/Profile/Sections/types' import {atoms as a, useTheme} from '#/alf' import {ListFooter, ListMaybePlaceholder} from '#/components/Lists' import {Default as ProfileCard} from '#/components/ProfileCard' diff --git a/src/components/StarterPack/QrCode.tsx b/src/components/StarterPack/QrCode.tsx index 6443ec694..86f1aa1e6 100644 --- a/src/components/StarterPack/QrCode.tsx +++ b/src/components/StarterPack/QrCode.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native' // @ts-expect-error missing types import QRCode from 'react-native-qrcode-styled' import type ViewShot from 'react-native-view-shot' -import {AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api' +import {type AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api' import {Trans} from '@lingui/macro' import {isWeb} from '#/platform/detection' diff --git a/src/components/StarterPack/Wizard/ScreenTransition.tsx b/src/components/StarterPack/Wizard/ScreenTransition.tsx index 9b76d4c60..c02888e1d 100644 --- a/src/components/StarterPack/Wizard/ScreenTransition.tsx +++ b/src/components/StarterPack/Wizard/ScreenTransition.tsx @@ -1,11 +1,11 @@ -import React from 'react' -import {StyleProp, ViewStyle} from 'react-native' +import {type StyleProp, type ViewStyle} from 'react-native' import Animated, { FadeIn, FadeOut, SlideInLeft, SlideInRight, } from 'react-native-reanimated' +import type React from 'react' import {isWeb} from '#/platform/detection' diff --git a/src/components/SubtleWebHover.tsx b/src/components/SubtleWebHover.tsx index 5cbbfc898..d60968e9c 100644 --- a/src/components/SubtleWebHover.tsx +++ b/src/components/SubtleWebHover.tsx @@ -1,4 +1,4 @@ -import {ViewStyleProp} from '#/alf' +import {type ViewStyleProp} from '#/alf' export function SubtleWebHover({}: ViewStyleProp & {hover: boolean}) { return null diff --git a/src/components/TrendingTopics.tsx b/src/components/TrendingTopics.tsx index a1de5d490..50e0fc5ed 100644 --- a/src/components/TrendingTopics.tsx +++ b/src/components/TrendingTopics.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {AtUri} from '@atproto/api' +import {type AtUri} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -10,10 +10,10 @@ import {PressableScale} from '#/lib/custom-animations/PressableScale' // import {Hashtag_Stroke2_Corner0_Rounded as Hashtag} from '#/components/icons/Hashtag' // import {CloseQuote_Filled_Stroke2_Corner0_Rounded as Quote} from '#/components/icons/Quote' // import {UserAvatar} from '#/view/com/util/UserAvatar' -import type {TrendingTopic} from '#/state/queries/trending/useTrendingTopics' -import {atoms as a, native, useTheme, ViewStyleProp} from '#/alf' +import {type TrendingTopic} from '#/state/queries/trending/useTrendingTopics' +import {atoms as a, native, useTheme, type ViewStyleProp} from '#/alf' import {StarterPack as StarterPackIcon} from '#/components/icons/StarterPack' -import {Link as InternalLink, LinkProps} from '#/components/Link' +import {Link as InternalLink, type LinkProps} from '#/components/Link' import {Text} from '#/components/Typography' export function TrendingTopic({ diff --git a/src/components/VideoPostCard.tsx b/src/components/VideoPostCard.tsx index a1bdd29b4..010ab075d 100644 --- a/src/components/VideoPostCard.tsx +++ b/src/components/VideoPostCard.tsx @@ -3,11 +3,11 @@ import {View} from 'react-native' import {Image} from 'expo-image' import {LinearGradient} from 'expo-linear-gradient' import { - AppBskyActorDefs, + type AppBskyActorDefs, AppBskyEmbedVideo, - AppBskyFeedDefs, + type AppBskyFeedDefs, AppBskyFeedPost, - ModerationDecision, + type ModerationDecision, } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -15,7 +15,7 @@ import {useLingui} from '@lingui/react' import {sanitizeHandle} from '#/lib/strings/handles' import {formatCount} from '#/view/com/util/numeric/format' import {UserAvatar} from '#/view/com/util/UserAvatar' -import {VideoFeedSourceContext} from '#/screens/VideoFeed/types' +import {type VideoFeedSourceContext} from '#/screens/VideoFeed/types' import {atoms as a, useTheme} from '#/alf' import {BLUE_HUE} from '#/alf/util/colorGeneration' import {select} from '#/alf/util/themeSelector' diff --git a/src/components/anim/AnimatedCheck.tsx b/src/components/anim/AnimatedCheck.tsx index 60407274e..2198598ca 100644 --- a/src/components/anim/AnimatedCheck.tsx +++ b/src/components/anim/AnimatedCheck.tsx @@ -8,7 +8,7 @@ import Animated, { } from 'react-native-reanimated' import Svg, {Circle, Path} from 'react-native-svg' -import {Props, useCommonSVGProps} from '#/components/icons/common' +import {type Props, useCommonSVGProps} from '#/components/icons/common' const AnimatedPath = Animated.createAnimatedComponent(Path) const AnimatedCircle = Animated.createAnimatedComponent(Circle) diff --git a/src/components/dialogs/Embed.tsx b/src/components/dialogs/Embed.tsx index 9ea400abe..594800c82 100644 --- a/src/components/dialogs/Embed.tsx +++ b/src/components/dialogs/Embed.tsx @@ -1,6 +1,6 @@ import {memo, useEffect, useMemo, useState} from 'react' import {View} from 'react-native' -import {AppBskyActorDefs, AppBskyFeedPost, AtUri} from '@atproto/api' +import {type AppBskyActorDefs, type AppBskyFeedPost, AtUri} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/dialogs/MutedWords.tsx b/src/components/dialogs/MutedWords.tsx index 666b93068..e289e1641 100644 --- a/src/components/dialogs/MutedWords.tsx +++ b/src/components/dialogs/MutedWords.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {AppBskyActorDefs, sanitizeMutedWordValue} from '@atproto/api' +import {type AppBskyActorDefs, sanitizeMutedWordValue} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -16,7 +16,7 @@ import { native, useBreakpoints, useTheme, - ViewStyleProp, + type ViewStyleProp, web, } from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' diff --git a/src/components/dms/BlockedByListDialog.tsx b/src/components/dms/BlockedByListDialog.tsx index 2a83ea8c0..c071d0bba 100644 --- a/src/components/dms/BlockedByListDialog.tsx +++ b/src/components/dms/BlockedByListDialog.tsx @@ -1,13 +1,13 @@ import React from 'react' import {View} from 'react-native' -import {ModerationCause} from '@atproto/api' +import {type ModerationCause} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {listUriToHref} from '#/lib/strings/url-helpers' import {atoms as a, useTheme} from '#/alf' import * as Dialog from '#/components/Dialog' -import {DialogControlProps} from '#/components/Dialog' +import {type DialogControlProps} from '#/components/Dialog' import {InlineLinkText} from '#/components/Link' import * as Prompt from '#/components/Prompt' import {Text} from '#/components/Typography' diff --git a/src/components/dms/LeaveConvoPrompt.tsx b/src/components/dms/LeaveConvoPrompt.tsx index 57acd5ca7..97d8600d0 100644 --- a/src/components/dms/LeaveConvoPrompt.tsx +++ b/src/components/dms/LeaveConvoPrompt.tsx @@ -2,11 +2,11 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {StackActions, useNavigation} from '@react-navigation/native' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {isNative} from '#/platform/detection' import {useLeaveConvo} from '#/state/queries/messages/leave-conversation' import * as Toast from '#/view/com/util/Toast' -import {DialogOuterProps} from '#/components/Dialog' +import {type DialogOuterProps} from '#/components/Dialog' import * as Prompt from '#/components/Prompt' export function LeaveConvoPrompt({ diff --git a/src/components/dms/MessagesListBlockedFooter.tsx b/src/components/dms/MessagesListBlockedFooter.tsx index 9c63ef2c7..8f75f4306 100644 --- a/src/components/dms/MessagesListBlockedFooter.tsx +++ b/src/components/dms/MessagesListBlockedFooter.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {ModerationDecision} from '@atproto/api' +import {type ModerationDecision} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -14,7 +14,7 @@ import {BlockedByListDialog} from '#/components/dms/BlockedByListDialog' import {LeaveConvoPrompt} from '#/components/dms/LeaveConvoPrompt' import {ReportConversationPrompt} from '#/components/dms/ReportConversationPrompt' import {Text} from '#/components/Typography' -import * as bsky from '#/types/bsky' +import type * as bsky from '#/types/bsky' export function MessagesListBlockedFooter({ recipient: initialRecipient, diff --git a/src/components/dms/ReportConversationPrompt.tsx b/src/components/dms/ReportConversationPrompt.tsx index 6bb26a60f..fed5c914c 100644 --- a/src/components/dms/ReportConversationPrompt.tsx +++ b/src/components/dms/ReportConversationPrompt.tsx @@ -1,7 +1,7 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {DialogControlProps} from '#/components/Dialog' +import {type DialogControlProps} from '#/components/Dialog' import * as Prompt from '#/components/Prompt' export function ReportConversationPrompt({ diff --git a/src/components/feeds/PostFeedVideoGridRow.tsx b/src/components/feeds/PostFeedVideoGridRow.tsx index 7f9898083..c4014fd44 100644 --- a/src/components/feeds/PostFeedVideoGridRow.tsx +++ b/src/components/feeds/PostFeedVideoGridRow.tsx @@ -2,8 +2,8 @@ import {View} from 'react-native' import {AppBskyEmbedVideo} from '@atproto/api' import {logEvent} from '#/lib/statsig/statsig' -import {FeedPostSliceItem} from '#/state/queries/post-feed' -import {VideoFeedSourceContext} from '#/screens/VideoFeed/types' +import {type FeedPostSliceItem} from '#/state/queries/post-feed' +import {type VideoFeedSourceContext} from '#/screens/VideoFeed/types' import {atoms as a, useGutters} from '#/alf' import * as Grid from '#/components/Grid' import { diff --git a/src/components/forms/DateField/index.web.tsx b/src/components/forms/DateField/index.web.tsx index 00f58202a..e9f0e9c8c 100644 --- a/src/components/forms/DateField/index.web.tsx +++ b/src/components/forms/DateField/index.web.tsx @@ -1,9 +1,9 @@ import React from 'react' -import {StyleSheet, TextInput, TextInputProps} from 'react-native' +import {StyleSheet, type TextInput, type TextInputProps} from 'react-native' // @ts-expect-error untyped import {unstable_createElement} from 'react-native-web' -import {DateFieldProps} from '#/components/forms/DateField/types' +import {type DateFieldProps} from '#/components/forms/DateField/types' import {toSimpleDateString} from '#/components/forms/DateField/utils' import * as TextField from '#/components/forms/TextField' import {CalendarDays_Stroke2_Corner0_Rounded as CalendarDays} from '#/components/icons/CalendarDays' diff --git a/src/components/forms/SearchInput.tsx b/src/components/forms/SearchInput.tsx index cbf02ac8b..618a0040e 100644 --- a/src/components/forms/SearchInput.tsx +++ b/src/components/forms/SearchInput.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {TextInput, View} from 'react-native' +import {type TextInput, View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/hooks/useFollowMethods.ts b/src/components/hooks/useFollowMethods.ts index e6b3f2c47..cba617d10 100644 --- a/src/components/hooks/useFollowMethods.ts +++ b/src/components/hooks/useFollowMethods.ts @@ -2,13 +2,13 @@ import React from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {LogEvents} from '#/lib/statsig/statsig' +import {type LogEvents} from '#/lib/statsig/statsig' import {logger} from '#/logger' -import {Shadow} from '#/state/cache/types' +import {type Shadow} from '#/state/cache/types' import {useProfileFollowMutationQueue} from '#/state/queries/profile' import {useRequireAuth} from '#/state/session' import * as Toast from '#/view/com/util/Toast' -import * as bsky from '#/types/bsky' +import type * as bsky from '#/types/bsky' export function useFollowMethods({ profile, diff --git a/src/components/icons/TEMPLATE.tsx b/src/components/icons/TEMPLATE.tsx index 47a5c36b2..be161c271 100644 --- a/src/components/icons/TEMPLATE.tsx +++ b/src/components/icons/TEMPLATE.tsx @@ -1,7 +1,7 @@ import React from 'react' import Svg, {Path} from 'react-native-svg' -import {Props, useCommonSVGProps} from '#/components/icons/common' +import {type Props, useCommonSVGProps} from '#/components/icons/common' export const IconTemplate_Stroke2_Corner0_Rounded = React.forwardRef( function LogoImpl(props: Props, ref) { diff --git a/src/components/intents/VerifyEmailIntentDialog.tsx b/src/components/intents/VerifyEmailIntentDialog.tsx index c78aabb6d..ab628eeef 100644 --- a/src/components/intents/VerifyEmailIntentDialog.tsx +++ b/src/components/intents/VerifyEmailIntentDialog.tsx @@ -8,7 +8,7 @@ import {useAgent, useSession} from '#/state/session' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' -import {DialogControlProps} from '#/components/Dialog' +import {type DialogControlProps} from '#/components/Dialog' import {Divider} from '#/components/Divider' import {ArrowRotateCounterClockwise_Stroke2_Corner0_Rounded as Resend} from '#/components/icons/ArrowRotateCounterClockwise' import {useIntentDialogs} from '#/components/intents/IntentDialogs' diff --git a/src/components/moderation/LabelsOnMe.tsx b/src/components/moderation/LabelsOnMe.tsx index f0a25959f..a55ef470f 100644 --- a/src/components/moderation/LabelsOnMe.tsx +++ b/src/components/moderation/LabelsOnMe.tsx @@ -1,11 +1,16 @@ -import {StyleProp, View, ViewStyle} from 'react-native' -import {AppBskyFeedDefs, ComAtprotoLabelDefs} from '@atproto/api' +import {type StyleProp, View, type ViewStyle} from 'react-native' +import {type AppBskyFeedDefs, type ComAtprotoLabelDefs} from '@atproto/api' import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useSession} from '#/state/session' import {atoms as a} from '#/alf' -import {Button, ButtonIcon, ButtonSize, ButtonText} from '#/components/Button' +import { + Button, + ButtonIcon, + type ButtonSize, + ButtonText, +} from '#/components/Button' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' import { LabelsOnMeDialog, diff --git a/src/components/moderation/LabelsOnMeDialog.tsx b/src/components/moderation/LabelsOnMeDialog.tsx index 56c6af0a4..940a49590 100644 --- a/src/components/moderation/LabelsOnMeDialog.tsx +++ b/src/components/moderation/LabelsOnMeDialog.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {ComAtprotoLabelDefs, ComAtprotoModerationDefs} from '@atproto/api' +import {type ComAtprotoLabelDefs, ComAtprotoModerationDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useMutation} from '@tanstack/react-query' diff --git a/src/components/moderation/ModerationDetailsDialog.tsx b/src/components/moderation/ModerationDetailsDialog.tsx index 658ef48d1..d56af48e3 100644 --- a/src/components/moderation/ModerationDetailsDialog.tsx +++ b/src/components/moderation/ModerationDetailsDialog.tsx @@ -1,5 +1,5 @@ import {View} from 'react-native' -import {ModerationCause} from '@atproto/api' +import {type ModerationCause} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -12,7 +12,7 @@ import {useSession} from '#/state/session' import {atoms as a, useGutters, useTheme} from '#/alf' import * as Dialog from '#/components/Dialog' import {InlineLinkText} from '#/components/Link' -import {AppModerationCause} from '#/components/Pills' +import {type AppModerationCause} from '#/components/Pills' import {Text} from '#/components/Typography' export {useDialogControl as useModerationDetailsDialogControl} from '#/components/Dialog' diff --git a/src/components/moderation/PostAlerts.tsx b/src/components/moderation/PostAlerts.tsx index e5d30da15..7a9c38cc6 100644 --- a/src/components/moderation/PostAlerts.tsx +++ b/src/components/moderation/PostAlerts.tsx @@ -1,5 +1,5 @@ -import {StyleProp, ViewStyle} from 'react-native' -import {ModerationCause, ModerationUI} from '@atproto/api' +import {type StyleProp, type ViewStyle} from 'react-native' +import {type ModerationCause, type ModerationUI} from '@atproto/api' import {getModerationCauseKey, unique} from '#/lib/moderation' import * as Pills from '#/components/Pills' diff --git a/src/components/moderation/ProfileHeaderAlerts.tsx b/src/components/moderation/ProfileHeaderAlerts.tsx index 9aed1f13d..21359a86e 100644 --- a/src/components/moderation/ProfileHeaderAlerts.tsx +++ b/src/components/moderation/ProfileHeaderAlerts.tsx @@ -1,5 +1,5 @@ -import {StyleProp, ViewStyle} from 'react-native' -import {ModerationDecision} from '@atproto/api' +import {type StyleProp, type ViewStyle} from 'react-native' +import {type ModerationDecision} from '@atproto/api' import {getModerationCauseKey, unique} from '#/lib/moderation' import * as Pills from '#/components/Pills' diff --git a/src/components/moderation/ReportDialog/action.ts b/src/components/moderation/ReportDialog/action.ts index fde2c7898..2da6e4829 100644 --- a/src/components/moderation/ReportDialog/action.ts +++ b/src/components/moderation/ReportDialog/action.ts @@ -1,7 +1,7 @@ import { - $Typed, - ChatBskyConvoDefs, - ComAtprotoModerationCreateReport, + type $Typed, + type ChatBskyConvoDefs, + type ComAtprotoModerationCreateReport, } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -9,8 +9,8 @@ import {useMutation} from '@tanstack/react-query' import {logger} from '#/logger' import {useAgent} from '#/state/session' -import {ReportState} from './state' -import {ParsedReportSubject} from './types' +import {type ReportState} from './state' +import {type ParsedReportSubject} from './types' export function useSubmitReportMutation() { const {_} = useLingui() diff --git a/src/components/moderation/ReportDialog/copy.ts b/src/components/moderation/ReportDialog/copy.ts index 87e199f98..11536c00c 100644 --- a/src/components/moderation/ReportDialog/copy.ts +++ b/src/components/moderation/ReportDialog/copy.ts @@ -2,7 +2,7 @@ import {useMemo} from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {ParsedReportSubject} from './types' +import {type ParsedReportSubject} from './types' export function useCopyForSubject(subject: ParsedReportSubject) { const {_} = useLingui() diff --git a/src/components/moderation/ReportDialog/state.ts b/src/components/moderation/ReportDialog/state.ts index 3f55bfb01..18ee77df8 100644 --- a/src/components/moderation/ReportDialog/state.ts +++ b/src/components/moderation/ReportDialog/state.ts @@ -1,6 +1,6 @@ -import {AppBskyLabelerDefs, ComAtprotoModerationDefs} from '@atproto/api' +import {type AppBskyLabelerDefs, ComAtprotoModerationDefs} from '@atproto/api' -import {ReportOption} from './utils/useReportOptions' +import {type ReportOption} from './utils/useReportOptions' export type ReportState = { selectedOption?: ReportOption diff --git a/src/components/moderation/ReportDialog/types.ts b/src/components/moderation/ReportDialog/types.ts index 444f01c66..e84369905 100644 --- a/src/components/moderation/ReportDialog/types.ts +++ b/src/components/moderation/ReportDialog/types.ts @@ -1,12 +1,12 @@ import { - $Typed, - AppBskyActorDefs, - AppBskyFeedDefs, - AppBskyGraphDefs, - ChatBskyConvoDefs, + type $Typed, + type AppBskyActorDefs, + type AppBskyFeedDefs, + type AppBskyGraphDefs, + type ChatBskyConvoDefs, } from '@atproto/api' -import * as Dialog from '#/components/Dialog' +import type * as Dialog from '#/components/Dialog' export type ReportSubject = | $Typed diff --git a/src/components/moderation/ReportDialog/utils/parseReportSubject.ts b/src/components/moderation/ReportDialog/utils/parseReportSubject.ts index b79e49695..baab1934f 100644 --- a/src/components/moderation/ReportDialog/utils/parseReportSubject.ts +++ b/src/components/moderation/ReportDialog/utils/parseReportSubject.ts @@ -6,8 +6,8 @@ import { } from '@atproto/api' import { - ParsedReportSubject, - ReportSubject, + type ParsedReportSubject, + type ReportSubject, } from '#/components/moderation/ReportDialog/types' import * as bsky from '#/types/bsky' diff --git a/src/components/moderation/ScreenHider.tsx b/src/components/moderation/ScreenHider.tsx index 5680b60c2..dde07eb94 100644 --- a/src/components/moderation/ScreenHider.tsx +++ b/src/components/moderation/ScreenHider.tsx @@ -1,18 +1,18 @@ import React from 'react' import { - StyleProp, + type StyleProp, TouchableWithoutFeedback, View, - ViewStyle, + type ViewStyle, } from 'react-native' -import {ModerationUI} from '@atproto/api' +import {type ModerationUI} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import {useModerationCauseDescription} from '#/lib/moderation/useModerationCauseDescription' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {CenteredView} from '#/view/com/util/Views' import {atoms as a, useTheme, web} from '#/alf' import {Button, ButtonText} from '#/components/Button' diff --git a/src/lib/api/feed/custom.ts b/src/lib/api/feed/custom.ts index dbb02467f..18bb8c8f0 100644 --- a/src/lib/api/feed/custom.ts +++ b/src/lib/api/feed/custom.ts @@ -1,6 +1,6 @@ import { - AppBskyFeedDefs, - AppBskyFeedGetFeed as GetCustomFeed, + type AppBskyFeedDefs, + type AppBskyFeedGetFeed as GetCustomFeed, BskyAgent, jsonStringToLex, } from '@atproto/api' @@ -9,7 +9,7 @@ import { getAppLanguageAsContentLanguage, getContentLanguages, } from '#/state/preferences/languages' -import {FeedAPI, FeedAPIResponse} from './types' +import {type FeedAPI, type FeedAPIResponse} from './types' import {createBskyTopicsHeader, isBlueskyOwnedFeed} from './utils' export class CustomFeedAPI implements FeedAPI { diff --git a/src/lib/api/feed/following.ts b/src/lib/api/feed/following.ts index 1004ccfb8..26de7f8a0 100644 --- a/src/lib/api/feed/following.ts +++ b/src/lib/api/feed/following.ts @@ -1,6 +1,6 @@ -import {AppBskyFeedDefs, BskyAgent} from '@atproto/api' +import {type AppBskyFeedDefs, type BskyAgent} from '@atproto/api' -import {FeedAPI, FeedAPIResponse} from './types' +import {type FeedAPI, type FeedAPIResponse} from './types' export class FollowingFeedAPI implements FeedAPI { agent: BskyAgent diff --git a/src/lib/api/feed/likes.ts b/src/lib/api/feed/likes.ts index 378446ce9..c970fa72f 100644 --- a/src/lib/api/feed/likes.ts +++ b/src/lib/api/feed/likes.ts @@ -1,10 +1,10 @@ import { - AppBskyFeedDefs, - AppBskyFeedGetActorLikes as GetActorLikes, - BskyAgent, + type AppBskyFeedDefs, + type AppBskyFeedGetActorLikes as GetActorLikes, + type BskyAgent, } from '@atproto/api' -import {FeedAPI, FeedAPIResponse} from './types' +import {type FeedAPI, type FeedAPIResponse} from './types' export class LikesFeedAPI implements FeedAPI { agent: BskyAgent diff --git a/src/lib/api/feed/merge.ts b/src/lib/api/feed/merge.ts index 7f8c1c275..b3f9575de 100644 --- a/src/lib/api/feed/merge.ts +++ b/src/lib/api/feed/merge.ts @@ -1,14 +1,22 @@ -import {AppBskyFeedDefs, AppBskyFeedGetTimeline, BskyAgent} from '@atproto/api' +import { + type AppBskyFeedDefs, + type AppBskyFeedGetTimeline, + type BskyAgent, +} from '@atproto/api' import shuffle from 'lodash.shuffle' import {bundleAsync} from '#/lib/async/bundle' import {timeout} from '#/lib/async/timeout' import {feedUriToHref} from '#/lib/strings/url-helpers' import {getContentLanguages} from '#/state/preferences/languages' -import {FeedParams} from '#/state/queries/post-feed' +import {type FeedParams} from '#/state/queries/post-feed' import {FeedTuner} from '../feed-manip' -import {FeedTunerFn} from '../feed-manip' -import {FeedAPI, FeedAPIResponse, ReasonFeedSource} from './types' +import {type FeedTunerFn} from '../feed-manip' +import { + type FeedAPI, + type FeedAPIResponse, + type ReasonFeedSource, +} from './types' import {createBskyTopicsHeader, isBlueskyOwnedFeed} from './utils' const REQUEST_WAIT_MS = 500 // 500ms diff --git a/src/lib/api/feed/types.ts b/src/lib/api/feed/types.ts index abc6511ba..27fa066fb 100644 --- a/src/lib/api/feed/types.ts +++ b/src/lib/api/feed/types.ts @@ -1,4 +1,4 @@ -import {AppBskyFeedDefs} from '@atproto/api' +import {type AppBskyFeedDefs} from '@atproto/api' export interface FeedAPIResponse { cursor?: string diff --git a/src/lib/api/feed/utils.ts b/src/lib/api/feed/utils.ts index 2d27fd783..3ed551595 100644 --- a/src/lib/api/feed/utils.ts +++ b/src/lib/api/feed/utils.ts @@ -2,7 +2,7 @@ import {AtUri} from '@atproto/api' import {BSKY_FEED_OWNER_DIDS} from '#/lib/constants' import {isWeb} from '#/platform/detection' -import {UsePreferencesQueryResponse} from '#/state/queries/preferences' +import {type UsePreferencesQueryResponse} from '#/state/queries/preferences' let debugTopics = '' if (isWeb && typeof window !== 'undefined') { diff --git a/src/lib/api/upload-blob.ts b/src/lib/api/upload-blob.ts index 07aeaf1a7..c7365bb24 100644 --- a/src/lib/api/upload-blob.ts +++ b/src/lib/api/upload-blob.ts @@ -1,5 +1,5 @@ import {copyAsync} from 'expo-file-system' -import {BskyAgent, ComAtprotoRepoUploadBlob} from '@atproto/api' +import {type BskyAgent, type ComAtprotoRepoUploadBlob} from '@atproto/api' import {safeDeleteAsync} from '#/lib/media/manip' diff --git a/src/lib/api/upload-blob.web.ts b/src/lib/api/upload-blob.web.ts index 45b72f7ee..9f21be567 100644 --- a/src/lib/api/upload-blob.web.ts +++ b/src/lib/api/upload-blob.web.ts @@ -1,4 +1,4 @@ -import {BskyAgent, ComAtprotoRepoUploadBlob} from '@atproto/api' +import {type BskyAgent, type ComAtprotoRepoUploadBlob} from '@atproto/api' /** * @note It is recommended, on web, to use the `file` instance of the file diff --git a/src/lib/assets.native.ts b/src/lib/assets.native.ts index 754bc9d2b..e679d6256 100644 --- a/src/lib/assets.native.ts +++ b/src/lib/assets.native.ts @@ -1,4 +1,4 @@ -import {ImageRequireSource} from 'react-native' +import {type ImageRequireSource} from 'react-native' export const DEF_AVATAR: ImageRequireSource = require('../../assets/default-avatar.png') export const CLOUD_SPLASH: ImageRequireSource = require('../../assets/splash.png') diff --git a/src/lib/assets.ts b/src/lib/assets.ts index 8859607d5..c5e0f8493 100644 --- a/src/lib/assets.ts +++ b/src/lib/assets.ts @@ -1,4 +1,4 @@ -import {ImageRequireSource} from 'react-native' +import {type ImageRequireSource} from 'react-native' // @ts-ignore we need to pretend -prf export const DEF_AVATAR: ImageRequireSource = {uri: '/img/default-avatar.png'} diff --git a/src/lib/custom-animations/GestureActionView.web.tsx b/src/lib/custom-animations/GestureActionView.web.tsx index 3caaa724f..1b7d96174 100644 --- a/src/lib/custom-animations/GestureActionView.web.tsx +++ b/src/lib/custom-animations/GestureActionView.web.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type React from 'react' export function GestureActionView({children}: {children: React.ReactNode}) { return children diff --git a/src/lib/custom-animations/PressableScale.tsx b/src/lib/custom-animations/PressableScale.tsx index 9ac7e5eb2..b66ddef08 100644 --- a/src/lib/custom-animations/PressableScale.tsx +++ b/src/lib/custom-animations/PressableScale.tsx @@ -1,4 +1,9 @@ -import {Pressable, PressableProps, StyleProp, ViewStyle} from 'react-native' +import { + Pressable, + type PressableProps, + type StyleProp, + type ViewStyle, +} from 'react-native' import Animated, { cancelAnimation, useAnimatedStyle, diff --git a/src/lib/hooks/useAccountSwitcher.ts b/src/lib/hooks/useAccountSwitcher.ts index 22eb348f2..c1dbbc793 100644 --- a/src/lib/hooks/useAccountSwitcher.ts +++ b/src/lib/hooks/useAccountSwitcher.ts @@ -4,11 +4,11 @@ import {useLingui} from '@lingui/react' import {logger} from '#/logger' import {isWeb} from '#/platform/detection' -import {SessionAccount, useSessionApi} from '#/state/session' +import {type SessionAccount, useSessionApi} from '#/state/session' import {useLoggedOutViewControls} from '#/state/shell/logged-out' import * as Toast from '#/view/com/util/Toast' import {logEvent} from '../statsig/statsig' -import {LogEvents} from '../statsig/statsig' +import {type LogEvents} from '../statsig/statsig' export function useAccountSwitcher() { const [pendingDid, setPendingDid] = useState(null) diff --git a/src/lib/hooks/useGoBack.ts b/src/lib/hooks/useGoBack.ts index e5a39f745..25c951ca4 100644 --- a/src/lib/hooks/useGoBack.ts +++ b/src/lib/hooks/useGoBack.ts @@ -1,6 +1,6 @@ import {StackActions, useNavigation} from '@react-navigation/native' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {router} from '#/routes' export function useGoBack(onGoBack?: () => unknown) { diff --git a/src/lib/hooks/useSetTitle.ts b/src/lib/hooks/useSetTitle.ts index fa1e2a5b1..04f9dcc2c 100644 --- a/src/lib/hooks/useSetTitle.ts +++ b/src/lib/hooks/useSetTitle.ts @@ -1,7 +1,7 @@ import {useEffect} from 'react' import {useNavigation} from '@react-navigation/native' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {bskyTitle} from '#/lib/strings/headings' import {useUnreadNotifications} from '#/state/queries/notifications/unread' diff --git a/src/lib/hooks/useTimeAgo.ts b/src/lib/hooks/useTimeAgo.ts index e9430ad47..b41bf690c 100644 --- a/src/lib/hooks/useTimeAgo.ts +++ b/src/lib/hooks/useTimeAgo.ts @@ -1,5 +1,5 @@ import {useCallback} from 'react' -import {I18n} from '@lingui/core' +import {type I18n} from '@lingui/core' import {defineMessage, msg, plural} from '@lingui/macro' import {useLingui} from '@lingui/react' import {differenceInSeconds} from 'date-fns' diff --git a/src/lib/hooks/useWebScrollRestoration.ts b/src/lib/hooks/useWebScrollRestoration.ts index 36484ba0f..d5281f114 100644 --- a/src/lib/hooks/useWebScrollRestoration.ts +++ b/src/lib/hooks/useWebScrollRestoration.ts @@ -1,5 +1,5 @@ import {useEffect, useMemo, useState} from 'react' -import {EventArg, useNavigation} from '@react-navigation/core' +import {type EventArg, useNavigation} from '@react-navigation/core' if ('scrollRestoration' in history) { // Tell the brower not to mess with the scroll. diff --git a/src/lib/media/video/compress.web.ts b/src/lib/media/video/compress.web.ts index 995fbf1da..83fdfde53 100644 --- a/src/lib/media/video/compress.web.ts +++ b/src/lib/media/video/compress.web.ts @@ -1,8 +1,8 @@ -import {ImagePickerAsset} from 'expo-image-picker' +import {type ImagePickerAsset} from 'expo-image-picker' import {VIDEO_MAX_SIZE} from '#/lib/constants' import {VideoTooLargeError} from '#/lib/media/video/errors' -import {CompressedVideo} from './types' +import {type CompressedVideo} from './types' // doesn't actually compress, converts to ArrayBuffer export async function compressVideo( diff --git a/src/lib/media/video/upload.shared.ts b/src/lib/media/video/upload.shared.ts index 8c217eadc..f74efa03a 100644 --- a/src/lib/media/video/upload.shared.ts +++ b/src/lib/media/video/upload.shared.ts @@ -1,5 +1,5 @@ -import {BskyAgent} from '@atproto/api' -import {I18n} from '@lingui/core' +import {type BskyAgent} from '@atproto/api' +import {type I18n} from '@lingui/core' import {msg} from '@lingui/macro' import {VIDEO_SERVICE_DID} from '#/lib/constants' diff --git a/src/lib/media/video/upload.ts b/src/lib/media/video/upload.ts index 720283a8d..86a1231a7 100644 --- a/src/lib/media/video/upload.ts +++ b/src/lib/media/video/upload.ts @@ -1,12 +1,12 @@ import {createUploadTask, FileSystemUploadType} from 'expo-file-system' -import {AppBskyVideoDefs, BskyAgent} from '@atproto/api' -import {I18n} from '@lingui/core' +import {type AppBskyVideoDefs, type BskyAgent} from '@atproto/api' +import {type I18n} from '@lingui/core' import {msg} from '@lingui/macro' import {nanoid} from 'nanoid/non-secure' import {AbortError} from '#/lib/async/cancelable' import {ServerError} from '#/lib/media/video/errors' -import {CompressedVideo} from '#/lib/media/video/types' +import {type CompressedVideo} from '#/lib/media/video/types' import {getServiceAuthToken, getVideoUploadLimits} from './upload.shared' import {createVideoEndpointUrl, mimeToExt} from './util' diff --git a/src/lib/media/video/upload.web.ts b/src/lib/media/video/upload.web.ts index d1b441a36..84483dae8 100644 --- a/src/lib/media/video/upload.web.ts +++ b/src/lib/media/video/upload.web.ts @@ -1,12 +1,12 @@ -import {AppBskyVideoDefs} from '@atproto/api' -import {BskyAgent} from '@atproto/api' -import {I18n} from '@lingui/core' +import {type AppBskyVideoDefs} from '@atproto/api' +import {type BskyAgent} from '@atproto/api' +import {type I18n} from '@lingui/core' import {msg} from '@lingui/macro' import {nanoid} from 'nanoid/non-secure' import {AbortError} from '#/lib/async/cancelable' import {ServerError} from '#/lib/media/video/errors' -import {CompressedVideo} from '#/lib/media/video/types' +import {type CompressedVideo} from '#/lib/media/video/types' import {getServiceAuthToken, getVideoUploadLimits} from './upload.shared' import {createVideoEndpointUrl, mimeToExt} from './util' diff --git a/src/lib/media/video/util.ts b/src/lib/media/video/util.ts index b80e0a4a1..1be8ff1ad 100644 --- a/src/lib/media/video/util.ts +++ b/src/lib/media/video/util.ts @@ -1,6 +1,6 @@ import {AtpAgent} from '@atproto/api' -import {SupportedMimeTypes, VIDEO_SERVICE} from '#/lib/constants' +import {type SupportedMimeTypes, VIDEO_SERVICE} from '#/lib/constants' export const createVideoEndpointUrl = ( route: string, diff --git a/src/lib/moderation/blocked-and-muted.ts b/src/lib/moderation/blocked-and-muted.ts index 27c461a3d..9806ca83a 100644 --- a/src/lib/moderation/blocked-and-muted.ts +++ b/src/lib/moderation/blocked-and-muted.ts @@ -1,4 +1,4 @@ -import * as bsky from '#/types/bsky' +import type * as bsky from '#/types/bsky' export function isBlockedOrBlocking(profile: bsky.profile.AnyProfileView) { return profile.viewer?.blockedBy || profile.viewer?.blocking diff --git a/src/lib/moderation/useLabelBehaviorDescription.ts b/src/lib/moderation/useLabelBehaviorDescription.ts index 4e773e0f0..90db665f4 100644 --- a/src/lib/moderation/useLabelBehaviorDescription.ts +++ b/src/lib/moderation/useLabelBehaviorDescription.ts @@ -1,4 +1,7 @@ -import {InterpretedLabelValueDefinition, LabelPreference} from '@atproto/api' +import { + type InterpretedLabelValueDefinition, + type LabelPreference, +} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/lib/moderation/useLabelInfo.ts b/src/lib/moderation/useLabelInfo.ts index 0ff7e1246..f39840607 100644 --- a/src/lib/moderation/useLabelInfo.ts +++ b/src/lib/moderation/useLabelInfo.ts @@ -1,7 +1,7 @@ import { - AppBskyLabelerDefs, - ComAtprotoLabelDefs, - InterpretedLabelValueDefinition, + type AppBskyLabelerDefs, + type ComAtprotoLabelDefs, + type InterpretedLabelValueDefinition, interpretLabelValueDefinition, LABELS, } from '@atproto/api' @@ -9,7 +9,7 @@ import {useLingui} from '@lingui/react' import * as bcp47Match from 'bcp-47-match' import { - GlobalLabelStrings, + type GlobalLabelStrings, useGlobalLabelStrings, } from '#/lib/moderation/useGlobalLabelStrings' import {useLabelDefinitions} from '#/state/preferences' diff --git a/src/lib/react-query.tsx b/src/lib/react-query.tsx index 5abfccd7f..fe3ec6f4c 100644 --- a/src/lib/react-query.tsx +++ b/src/lib/react-query.tsx @@ -1,12 +1,13 @@ -import React, {useRef, useState} from 'react' -import {AppState, AppStateStatus} from 'react-native' +import {useRef, useState} from 'react' +import {AppState, type AppStateStatus} from 'react-native' import AsyncStorage from '@react-native-async-storage/async-storage' import {createAsyncStoragePersister} from '@tanstack/query-async-storage-persister' import {focusManager, onlineManager, QueryClient} from '@tanstack/react-query' import { PersistQueryClientProvider, - PersistQueryClientProviderProps, + type PersistQueryClientProviderProps, } from '@tanstack/react-query-persist-client' +import type React from 'react' import {isNative} from '#/platform/detection' import {listenNetworkConfirmed, listenNetworkLost} from '#/state/events' diff --git a/src/lib/routes/helpers.ts b/src/lib/routes/helpers.ts index 1297df8d2..33e7563a3 100644 --- a/src/lib/routes/helpers.ts +++ b/src/lib/routes/helpers.ts @@ -1,6 +1,6 @@ -import {NavigationProp} from '@react-navigation/native' +import {type NavigationProp} from '@react-navigation/native' -import {RouteParams, State} from './types' +import {type RouteParams, type State} from './types' export function getRootNavigation( nav: NavigationProp, diff --git a/src/lib/strings/display-names.ts b/src/lib/strings/display-names.ts index a95bfd679..612a317ea 100644 --- a/src/lib/strings/display-names.ts +++ b/src/lib/strings/display-names.ts @@ -1,4 +1,4 @@ -import {ModerationUI} from '@atproto/api' +import {type ModerationUI} from '@atproto/api' // \u2705 = ✅ // \u2713 = ✓ diff --git a/src/lib/strings/rich-text-helpers.ts b/src/lib/strings/rich-text-helpers.ts index 54f0733d0..c2b2ceac5 100644 --- a/src/lib/strings/rich-text-helpers.ts +++ b/src/lib/strings/rich-text-helpers.ts @@ -1,4 +1,4 @@ -import {AppBskyRichtextFacet, RichText} from '@atproto/api' +import {AppBskyRichtextFacet, type RichText} from '@atproto/api' import {linkRequiresWarning} from './url-helpers' diff --git a/src/lib/strings/rich-text-manip.ts b/src/lib/strings/rich-text-manip.ts index 2e84656f2..099fbffb0 100644 --- a/src/lib/strings/rich-text-manip.ts +++ b/src/lib/strings/rich-text-manip.ts @@ -1,4 +1,4 @@ -import {AppBskyRichtextFacet, RichText, UnicodeString} from '@atproto/api' +import {AppBskyRichtextFacet, type RichText, UnicodeString} from '@atproto/api' import {toShortUrl} from './url-helpers' diff --git a/src/lib/strings/time.ts b/src/lib/strings/time.ts index 3823af188..586c16492 100644 --- a/src/lib/strings/time.ts +++ b/src/lib/strings/time.ts @@ -1,4 +1,4 @@ -import {I18n} from '@lingui/core' +import {type I18n} from '@lingui/core' export function niceDate(i18n: I18n, date: number | string | Date) { const d = new Date(date) diff --git a/src/lib/themes.ts b/src/lib/themes.ts index 2aeec3139..1d590dab7 100644 --- a/src/lib/themes.ts +++ b/src/lib/themes.ts @@ -4,7 +4,7 @@ import {tokens} from '#/alf' import {darkPalette, dimPalette, lightPalette} from '#/alf/themes' import {fontWeight} from '#/alf/tokens' import {colors} from './styles' -import type {Theme} from './ThemeContext' +import {type Theme} from './ThemeContext' export const defaultTheme: Theme = { colorScheme: 'light', diff --git a/src/locale/deviceLocales.ts b/src/locale/deviceLocales.ts index b72daf68d..103fa5d67 100644 --- a/src/locale/deviceLocales.ts +++ b/src/locale/deviceLocales.ts @@ -1,4 +1,4 @@ -import {getLocales as defaultGetLocales, Locale} from 'expo-localization' +import {getLocales as defaultGetLocales, type Locale} from 'expo-localization' import {dedupArray} from '#/lib/functions' diff --git a/src/locale/i18nProvider.tsx b/src/locale/i18nProvider.tsx index f7f067973..6af55fe0e 100644 --- a/src/locale/i18nProvider.tsx +++ b/src/locale/i18nProvider.tsx @@ -1,6 +1,6 @@ -import React from 'react' import {i18n} from '@lingui/core' import {I18nProvider as DefaultI18nProvider} from '@lingui/react' +import type React from 'react' import {useLocaleLanguage} from './i18n' diff --git a/src/logger/__tests__/logDump.test.ts b/src/logger/__tests__/logDump.test.ts index 165bfac08..9575b7062 100644 --- a/src/logger/__tests__/logDump.test.ts +++ b/src/logger/__tests__/logDump.test.ts @@ -1,6 +1,6 @@ import {expect, test} from '@jest/globals' -import {add, ConsoleTransportEntry, getEntries} from '#/logger/logDump' +import {add, type ConsoleTransportEntry, getEntries} from '#/logger/logDump' import {LogContext, LogLevel} from '#/logger/types' test('works', () => { diff --git a/src/logger/logDump.ts b/src/logger/logDump.ts index 12cf899eb..e1a8aa31e 100644 --- a/src/logger/logDump.ts +++ b/src/logger/logDump.ts @@ -1,4 +1,4 @@ -import type {LogContext, LogLevel, Metadata} from '#/logger/types' +import {type LogContext, type LogLevel, type Metadata} from '#/logger/types' export type ConsoleTransportEntry = { id: string diff --git a/src/logger/transports/bitdrift.ts b/src/logger/transports/bitdrift.ts index a407f9485..d6b9728d4 100644 --- a/src/logger/transports/bitdrift.ts +++ b/src/logger/transports/bitdrift.ts @@ -1,5 +1,5 @@ import {debug, error, info, warn} from '#/logger/bitdrift/lib' -import {LogLevel, Transport} from '#/logger/types' +import {LogLevel, type Transport} from '#/logger/types' import {prepareMetadata} from '#/logger/util' const logFunctions = { diff --git a/src/logger/transports/console.ts b/src/logger/transports/console.ts index 6a687c69b..1f760630a 100644 --- a/src/logger/transports/console.ts +++ b/src/logger/transports/console.ts @@ -1,6 +1,6 @@ import format from 'date-fns/format' -import {LogLevel, Transport} from '#/logger/types' +import {LogLevel, type Transport} from '#/logger/types' import {prepareMetadata} from '#/logger/util' import {isWeb} from '#/platform/detection' diff --git a/src/logger/util.ts b/src/logger/util.ts index f1e12b164..cd0efa17a 100644 --- a/src/logger/util.ts +++ b/src/logger/util.ts @@ -1,4 +1,4 @@ -import {LogLevel, Metadata, Serializable} from '#/logger/types' +import {LogLevel, type Metadata, type Serializable} from '#/logger/types' export const enabledLogLevels: { [key in LogLevel]: LogLevel[] diff --git a/src/screens/Home/NoFeedsPinned.tsx b/src/screens/Home/NoFeedsPinned.tsx index 74412763f..fce4ffea2 100644 --- a/src/screens/Home/NoFeedsPinned.tsx +++ b/src/screens/Home/NoFeedsPinned.tsx @@ -6,7 +6,7 @@ import {useLingui} from '@lingui/react' import {DISCOVER_SAVED_FEED, TIMELINE_SAVED_FEED} from '#/lib/constants' import {useOverwriteSavedFeedsMutation} from '#/state/queries/preferences' -import {UsePreferencesQueryResponse} from '#/state/queries/preferences' +import {type UsePreferencesQueryResponse} from '#/state/queries/preferences' import {CenteredView} from '#/view/com/util/Views' import {atoms as a} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' diff --git a/src/screens/List/ListHiddenScreen.tsx b/src/screens/List/ListHiddenScreen.tsx index 261192fea..63f36dc94 100644 --- a/src/screens/List/ListHiddenScreen.tsx +++ b/src/screens/List/ListHiddenScreen.tsx @@ -11,7 +11,7 @@ import {logger} from '#/logger' import {RQKEY_ROOT as listQueryRoot} from '#/state/queries/list' import {useListBlockMutation, useListMuteMutation} from '#/state/queries/list' import { - UsePreferencesQueryResponse, + type UsePreferencesQueryResponse, useRemoveFeedMutation, } from '#/state/queries/preferences' import {useSession} from '#/state/session' diff --git a/src/screens/Login/ChooseAccountForm.tsx b/src/screens/Login/ChooseAccountForm.tsx index 9765786ec..dc69c83b0 100644 --- a/src/screens/Login/ChooseAccountForm.tsx +++ b/src/screens/Login/ChooseAccountForm.tsx @@ -5,7 +5,7 @@ import {useLingui} from '@lingui/react' import {logEvent} from '#/lib/statsig/statsig' import {logger} from '#/logger' -import {SessionAccount, useSession, useSessionApi} from '#/state/session' +import {type SessionAccount, useSession, useSessionApi} from '#/state/session' import {useLoggedOutViewControls} from '#/state/shell/logged-out' import * as Toast from '#/view/com/util/Toast' import {atoms as a} from '#/alf' diff --git a/src/screens/Login/FormContainer.tsx b/src/screens/Login/FormContainer.tsx index d5e075bdb..dc8ebb558 100644 --- a/src/screens/Login/FormContainer.tsx +++ b/src/screens/Login/FormContainer.tsx @@ -1,5 +1,5 @@ -import React from 'react' import {type StyleProp, View, type ViewStyle} from 'react-native' +import type React from 'react' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {Text} from '#/components/Typography' diff --git a/src/screens/Login/ScreenTransition.tsx b/src/screens/Login/ScreenTransition.tsx index 6fad26680..b9e4b2d55 100644 --- a/src/screens/Login/ScreenTransition.tsx +++ b/src/screens/Login/ScreenTransition.tsx @@ -1,6 +1,6 @@ -import React from 'react' -import {StyleProp, ViewStyle} from 'react-native' +import {type StyleProp, type ViewStyle} from 'react-native' import Animated, {FadeInRight, FadeOutLeft} from 'react-native-reanimated' +import type React from 'react' export function ScreenTransition({ style, diff --git a/src/screens/Messages/components/ChatStatusInfo.tsx b/src/screens/Messages/components/ChatStatusInfo.tsx index a74f3092b..c02034ff3 100644 --- a/src/screens/Messages/components/ChatStatusInfo.tsx +++ b/src/screens/Messages/components/ChatStatusInfo.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {ActiveConvoStates} from '#/state/messages/convo' +import {type ActiveConvoStates} from '#/state/messages/convo' import {useModerationOpts} from '#/state/preferences/moderation-opts' import {useSession} from '#/state/session' import {atoms as a, useTheme} from '#/alf' diff --git a/src/screens/Messages/components/MessageInputEmbed.tsx b/src/screens/Messages/components/MessageInputEmbed.tsx index c9bb8c77c..c4d61b000 100644 --- a/src/screens/Messages/components/MessageInputEmbed.tsx +++ b/src/screens/Messages/components/MessageInputEmbed.tsx @@ -9,10 +9,13 @@ import { } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {RouteProp, useNavigation, useRoute} from '@react-navigation/native' +import {type RouteProp, useNavigation, useRoute} from '@react-navigation/native' import {makeProfileLink} from '#/lib/routes/links' -import {CommonNavigatorParams, NavigationProp} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NavigationProp, +} from '#/lib/routes/types' import { convertBskyAppUrlIfNeeded, isBskyPostUrl, diff --git a/src/screens/Messages/components/MessageListError.tsx b/src/screens/Messages/components/MessageListError.tsx index 6f50948df..56fe9eb0a 100644 --- a/src/screens/Messages/components/MessageListError.tsx +++ b/src/screens/Messages/components/MessageListError.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {ConvoItem, ConvoItemError} from '#/state/messages/convo/types' +import {type ConvoItem, ConvoItemError} from '#/state/messages/convo/types' import {atoms as a, useTheme} from '#/alf' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' import {InlineLinkText} from '#/components/Link' diff --git a/src/screens/ModerationInteractionSettings/index.tsx b/src/screens/ModerationInteractionSettings/index.tsx index a7e29a8a9..0cdce2efb 100644 --- a/src/screens/ModerationInteractionSettings/index.tsx +++ b/src/screens/ModerationInteractionSettings/index.tsx @@ -9,7 +9,7 @@ import {usePostInteractionSettingsMutation} from '#/state/queries/post-interacti import {createPostgateRecord} from '#/state/queries/postgate/util' import { usePreferencesQuery, - UsePreferencesQueryResponse, + type UsePreferencesQueryResponse, } from '#/state/queries/preferences' import { threadgateAllowUISettingToAllowRecordValue, diff --git a/src/screens/Onboarding/StepInterests/InterestButton.tsx b/src/screens/Onboarding/StepInterests/InterestButton.tsx index 24b34041e..7f8b32b83 100644 --- a/src/screens/Onboarding/StepInterests/InterestButton.tsx +++ b/src/screens/Onboarding/StepInterests/InterestButton.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {TextStyle, View, ViewStyle} from 'react-native' +import {type TextStyle, View, type ViewStyle} from 'react-native' import {capitalize} from '#/lib/strings/capitalize' import {useInterestsDisplayNames} from '#/screens/Onboarding/state' diff --git a/src/screens/Onboarding/StepProfile/AvatarCreatorCircle.tsx b/src/screens/Onboarding/StepProfile/AvatarCreatorCircle.tsx index 1cd68eb61..033ce0b49 100644 --- a/src/screens/Onboarding/StepProfile/AvatarCreatorCircle.tsx +++ b/src/screens/Onboarding/StepProfile/AvatarCreatorCircle.tsx @@ -1,7 +1,7 @@ import React from 'react' import {View} from 'react-native' -import {Avatar} from '#/screens/Onboarding/StepProfile/index' +import {type Avatar} from '#/screens/Onboarding/StepProfile/index' import {atoms as a, useTheme} from '#/alf' export function AvatarCreatorCircle({ diff --git a/src/screens/Onboarding/StepProfile/AvatarCreatorItems.tsx b/src/screens/Onboarding/StepProfile/AvatarCreatorItems.tsx index 98c01ce7d..93a6469a8 100644 --- a/src/screens/Onboarding/StepProfile/AvatarCreatorItems.tsx +++ b/src/screens/Onboarding/StepProfile/AvatarCreatorItems.tsx @@ -3,12 +3,12 @@ import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {Avatar} from '#/screens/Onboarding/StepProfile/index' +import {type Avatar} from '#/screens/Onboarding/StepProfile/index' import { - AvatarColor, + type AvatarColor, avatarColors, emojiItems, - EmojiName, + type EmojiName, emojiNames, } from '#/screens/Onboarding/StepProfile/types' import {atoms as a, useTheme} from '#/alf' diff --git a/src/screens/Post/PostLikedBy.tsx b/src/screens/Post/PostLikedBy.tsx index 683818690..e1a482452 100644 --- a/src/screens/Post/PostLikedBy.tsx +++ b/src/screens/Post/PostLikedBy.tsx @@ -2,7 +2,10 @@ import React from 'react' import {Plural, Trans} from '@lingui/macro' import {useFocusEffect} from '@react-navigation/native' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {makeRecordUri} from '#/lib/strings/url-helpers' import {usePostThreadQuery} from '#/state/queries/post-thread' import {useSetMinimalShellMode} from '#/state/shell' diff --git a/src/screens/Post/PostQuotes.tsx b/src/screens/Post/PostQuotes.tsx index 24e942abf..3fa5d8027 100644 --- a/src/screens/Post/PostQuotes.tsx +++ b/src/screens/Post/PostQuotes.tsx @@ -2,7 +2,10 @@ import React from 'react' import {Plural, Trans} from '@lingui/macro' import {useFocusEffect} from '@react-navigation/native' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {makeRecordUri} from '#/lib/strings/url-helpers' import {usePostThreadQuery} from '#/state/queries/post-thread' import {useSetMinimalShellMode} from '#/state/shell' diff --git a/src/screens/Post/PostRepostedBy.tsx b/src/screens/Post/PostRepostedBy.tsx index e2f78f662..d79321d0a 100644 --- a/src/screens/Post/PostRepostedBy.tsx +++ b/src/screens/Post/PostRepostedBy.tsx @@ -2,7 +2,10 @@ import React from 'react' import {Plural, Trans} from '@lingui/macro' import {useFocusEffect} from '@react-navigation/native' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {makeRecordUri} from '#/lib/strings/url-helpers' import {usePostThreadQuery} from '#/state/queries/post-thread' import {useSetMinimalShellMode} from '#/state/shell' diff --git a/src/screens/Profile/ErrorState.tsx b/src/screens/Profile/ErrorState.tsx index b473435fc..af0a61905 100644 --- a/src/screens/Profile/ErrorState.tsx +++ b/src/screens/Profile/ErrorState.tsx @@ -4,7 +4,7 @@ import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {atoms as a, useTheme} from '#/alf' import {Button, ButtonText} from '#/components/Button' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' diff --git a/src/screens/Profile/Header/DisplayName.tsx b/src/screens/Profile/Header/DisplayName.tsx index b74c063d4..6be8f6694 100644 --- a/src/screens/Profile/Header/DisplayName.tsx +++ b/src/screens/Profile/Header/DisplayName.tsx @@ -1,9 +1,9 @@ import {View} from 'react-native' -import {AppBskyActorDefs, ModerationDecision} from '@atproto/api' +import {type AppBskyActorDefs, type ModerationDecision} from '@atproto/api' import {sanitizeDisplayName} from '#/lib/strings/display-names' import {sanitizeHandle} from '#/lib/strings/handles' -import {Shadow} from '#/state/cache/types' +import {type Shadow} from '#/state/cache/types' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {Text} from '#/components/Typography' diff --git a/src/screens/Profile/Header/GrowableAvatar.tsx b/src/screens/Profile/Header/GrowableAvatar.tsx index dab69f955..ac66046d6 100644 --- a/src/screens/Profile/Header/GrowableAvatar.tsx +++ b/src/screens/Profile/Header/GrowableAvatar.tsx @@ -1,11 +1,11 @@ -import React from 'react' -import {StyleProp, View, ViewStyle} from 'react-native' +import {type StyleProp, View, type ViewStyle} from 'react-native' import Animated, { Extrapolation, interpolate, - SharedValue, + type SharedValue, useAnimatedStyle, } from 'react-native-reanimated' +import type React from 'react' import {isIOS} from '#/platform/detection' import {usePagerHeaderContext} from '#/view/com/pager/PagerHeaderContext' diff --git a/src/screens/Profile/Header/GrowableBanner.tsx b/src/screens/Profile/Header/GrowableBanner.tsx index 3d2830439..ab1432bdc 100644 --- a/src/screens/Profile/Header/GrowableBanner.tsx +++ b/src/screens/Profile/Header/GrowableBanner.tsx @@ -1,11 +1,11 @@ -import React, {useEffect, useState} from 'react' +import {useEffect, useState} from 'react' import {View} from 'react-native' import {ActivityIndicator} from 'react-native' import Animated, { Extrapolation, interpolate, runOnJS, - SharedValue, + type SharedValue, useAnimatedProps, useAnimatedReaction, useAnimatedStyle, @@ -13,6 +13,7 @@ import Animated, { import {useSafeAreaInsets} from 'react-native-safe-area-context' import {BlurView} from 'expo-blur' import {useIsFetching} from '@tanstack/react-query' +import type React from 'react' import {isIOS} from '#/platform/detection' import {RQKEY_ROOT as STARTERPACK_RQKEY_ROOT} from '#/state/queries/actor-starter-packs' diff --git a/src/screens/Profile/Header/Metrics.tsx b/src/screens/Profile/Header/Metrics.tsx index 736e5ccee..a67b02542 100644 --- a/src/screens/Profile/Header/Metrics.tsx +++ b/src/screens/Profile/Header/Metrics.tsx @@ -1,10 +1,10 @@ import {View} from 'react-native' -import {AppBskyActorDefs} from '@atproto/api' +import {type AppBskyActorDefs} from '@atproto/api' import {msg, plural} from '@lingui/macro' import {useLingui} from '@lingui/react' import {makeProfileLink} from '#/lib/routes/links' -import {Shadow} from '#/state/cache/types' +import {type Shadow} from '#/state/cache/types' import {formatCount} from '#/view/com/util/numeric/format' import {atoms as a, useTheme} from '#/alf' import {InlineLinkText} from '#/components/Link' diff --git a/src/screens/Profile/Header/StatusBarShadow.tsx b/src/screens/Profile/Header/StatusBarShadow.tsx index 587b41051..7180e62bb 100644 --- a/src/screens/Profile/Header/StatusBarShadow.tsx +++ b/src/screens/Profile/Header/StatusBarShadow.tsx @@ -1,4 +1,7 @@ -import Animated, {SharedValue, useAnimatedStyle} from 'react-native-reanimated' +import Animated, { + type SharedValue, + useAnimatedStyle, +} from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {LinearGradient} from 'expo-linear-gradient' diff --git a/src/screens/Profile/Header/index.tsx b/src/screens/Profile/Header/index.tsx index 7e4b9bb31..1158a8aa5 100644 --- a/src/screens/Profile/Header/index.tsx +++ b/src/screens/Profile/Header/index.tsx @@ -1,5 +1,5 @@ import React, {memo, useState} from 'react' -import {LayoutChangeEvent, StyleSheet, View} from 'react-native' +import {type LayoutChangeEvent, StyleSheet, View} from 'react-native' import Animated, { runOnJS, useAnimatedReaction, @@ -8,10 +8,10 @@ import Animated, { } from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' import { - AppBskyActorDefs, - AppBskyLabelerDefs, - ModerationOpts, - RichText as RichTextAPI, + type AppBskyActorDefs, + type AppBskyLabelerDefs, + type ModerationOpts, + type RichText as RichTextAPI, } from '@atproto/api' import {useIsFocused} from '@react-navigation/native' diff --git a/src/screens/Profile/KnownFollowers.tsx b/src/screens/Profile/KnownFollowers.tsx index 6b22a0add..6c94ebeed 100644 --- a/src/screens/Profile/KnownFollowers.tsx +++ b/src/screens/Profile/KnownFollowers.tsx @@ -1,11 +1,14 @@ import React from 'react' -import {AppBskyActorDefs} from '@atproto/api' +import {type AppBskyActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useFocusEffect} from '@react-navigation/native' import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {cleanError} from '#/lib/strings/errors' import {logger} from '#/logger' import {useProfileKnownFollowersQuery} from '#/state/queries/known-followers' diff --git a/src/screens/Profile/ProfileFollowers.tsx b/src/screens/Profile/ProfileFollowers.tsx index 64292d20e..1bd784738 100644 --- a/src/screens/Profile/ProfileFollowers.tsx +++ b/src/screens/Profile/ProfileFollowers.tsx @@ -2,7 +2,10 @@ import React from 'react' import {Plural} from '@lingui/macro' import {useFocusEffect} from '@react-navigation/native' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {sanitizeDisplayName} from '#/lib/strings/display-names' import {useProfileQuery} from '#/state/queries/profile' import {useResolveDidQuery} from '#/state/queries/resolve-uri' diff --git a/src/screens/Profile/ProfileFollows.tsx b/src/screens/Profile/ProfileFollows.tsx index 85ebccf30..3faf5a332 100644 --- a/src/screens/Profile/ProfileFollows.tsx +++ b/src/screens/Profile/ProfileFollows.tsx @@ -2,7 +2,10 @@ import React from 'react' import {Plural} from '@lingui/macro' import {useFocusEffect} from '@react-navigation/native' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {sanitizeDisplayName} from '#/lib/strings/display-names' import {useProfileQuery} from '#/state/queries/profile' import {useResolveDidQuery} from '#/state/queries/resolve-uri' diff --git a/src/screens/Profile/ProfileLabelerLikedBy.tsx b/src/screens/Profile/ProfileLabelerLikedBy.tsx index ccc270084..f194f2398 100644 --- a/src/screens/Profile/ProfileLabelerLikedBy.tsx +++ b/src/screens/Profile/ProfileLabelerLikedBy.tsx @@ -3,7 +3,10 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useFocusEffect} from '@react-navigation/native' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {makeRecordUri} from '#/lib/strings/url-helpers' import {useSetMinimalShellMode} from '#/state/shell' import {ViewHeader} from '#/view/com/util/ViewHeader' diff --git a/src/screens/Settings/AppIconSettings/AppIconImage.tsx b/src/screens/Settings/AppIconSettings/AppIconImage.tsx index e81d5d0d5..61f718c43 100644 --- a/src/screens/Settings/AppIconSettings/AppIconImage.tsx +++ b/src/screens/Settings/AppIconSettings/AppIconImage.tsx @@ -1,6 +1,6 @@ import {Image} from 'expo-image' -import {AppIconSet} from '#/screens/Settings/AppIconSettings/types' +import {type AppIconSet} from '#/screens/Settings/AppIconSettings/types' import {atoms as a, platform, useTheme} from '#/alf' export function AppIconImage({ diff --git a/src/screens/Settings/components/AddAppPasswordDialog.tsx b/src/screens/Settings/components/AddAppPasswordDialog.tsx index 973d80a1b..7eaee2c71 100644 --- a/src/screens/Settings/components/AddAppPasswordDialog.tsx +++ b/src/screens/Settings/components/AddAppPasswordDialog.tsx @@ -8,7 +8,7 @@ import Animated, { SlideInRight, SlideOutLeft, } from 'react-native-reanimated' -import {ComAtprotoServerCreateAppPassword} from '@atproto/api' +import {type ComAtprotoServerCreateAppPassword} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useMutation} from '@tanstack/react-query' diff --git a/src/screens/Settings/components/CopyButton.tsx b/src/screens/Settings/components/CopyButton.tsx index 82c11f58d..5bc9e84c5 100644 --- a/src/screens/Settings/components/CopyButton.tsx +++ b/src/screens/Settings/components/CopyButton.tsx @@ -1,5 +1,5 @@ import {useCallback, useEffect, useState} from 'react' -import {GestureResponderEvent, View} from 'react-native' +import {type GestureResponderEvent, View} from 'react-native' import Animated, { FadeOutUp, useReducedMotion, @@ -9,7 +9,7 @@ import * as Clipboard from 'expo-clipboard' import {Trans} from '@lingui/macro' import {atoms as a, useTheme} from '#/alf' -import {Button, ButtonProps} from '#/components/Button' +import {Button, type ButtonProps} from '#/components/Button' import {Text} from '#/components/Typography' export function CopyButton({ diff --git a/src/screens/Settings/components/DeactivateAccountDialog.tsx b/src/screens/Settings/components/DeactivateAccountDialog.tsx index 78c685770..4570062ce 100644 --- a/src/screens/Settings/components/DeactivateAccountDialog.tsx +++ b/src/screens/Settings/components/DeactivateAccountDialog.tsx @@ -7,7 +7,7 @@ import {logger} from '#/logger' import {useAgent, useSessionApi} from '#/state/session' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' -import {DialogOuterProps} from '#/components/Dialog' +import {type DialogOuterProps} from '#/components/Dialog' import {Divider} from '#/components/Divider' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' import {Loader} from '#/components/Loader' diff --git a/src/screens/Settings/components/PwiOptOut.tsx b/src/screens/Settings/components/PwiOptOut.tsx index e58514976..5cdcb33c4 100644 --- a/src/screens/Settings/components/PwiOptOut.tsx +++ b/src/screens/Settings/components/PwiOptOut.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {$Typed, ComAtprotoLabelDefs} from '@atproto/api' +import {type $Typed, ComAtprotoLabelDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/StarterPack/Wizard/StepFeeds.tsx b/src/screens/StarterPack/Wizard/StepFeeds.tsx index b3c334bad..c87408e23 100644 --- a/src/screens/StarterPack/Wizard/StepFeeds.tsx +++ b/src/screens/StarterPack/Wizard/StepFeeds.tsx @@ -1,7 +1,7 @@ import {useState} from 'react' -import {ListRenderItemInfo, View} from 'react-native' +import {type ListRenderItemInfo, View} from 'react-native' import {KeyboardAwareScrollView} from 'react-native-keyboard-controller' -import {AppBskyFeedDefs, ModerationOpts} from '@atproto/api' +import {type AppBskyFeedDefs, type ModerationOpts} from '@atproto/api' import {Trans} from '@lingui/macro' import {DISCOVER_FEED_URI} from '#/lib/constants' diff --git a/src/screens/StarterPack/Wizard/StepProfiles.tsx b/src/screens/StarterPack/Wizard/StepProfiles.tsx index 8a9a891e1..25c063dee 100644 --- a/src/screens/StarterPack/Wizard/StepProfiles.tsx +++ b/src/screens/StarterPack/Wizard/StepProfiles.tsx @@ -1,7 +1,7 @@ import {useState} from 'react' -import {ListRenderItemInfo, View} from 'react-native' +import {type ListRenderItemInfo, View} from 'react-native' import {KeyboardAwareScrollView} from 'react-native-keyboard-controller' -import {AppBskyActorDefs, ModerationOpts} from '@atproto/api' +import {type AppBskyActorDefs, type ModerationOpts} from '@atproto/api' import {Trans} from '@lingui/macro' import {isNative} from '#/platform/detection' @@ -16,7 +16,7 @@ import {Loader} from '#/components/Loader' import {ScreenTransition} from '#/components/StarterPack/Wizard/ScreenTransition' import {WizardProfileCard} from '#/components/StarterPack/Wizard/WizardListCard' import {Text} from '#/components/Typography' -import * as bsky from '#/types/bsky' +import type * as bsky from '#/types/bsky' function keyExtractor(item: AppBskyActorDefs.ProfileViewBasic) { return item?.did ?? '' diff --git a/src/screens/VideoFeed/components/Header.tsx b/src/screens/VideoFeed/components/Header.tsx index 66c932119..3eb1d5dc4 100644 --- a/src/screens/VideoFeed/components/Header.tsx +++ b/src/screens/VideoFeed/components/Header.tsx @@ -1,17 +1,17 @@ import {useCallback} from 'react' -import {GestureResponderEvent, View} from 'react-native' +import {type GestureResponderEvent, View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' import {HITSLOP_30} from '#/lib/constants' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {sanitizeHandle} from '#/lib/strings/handles' import {useFeedSourceInfoQuery} from '#/state/queries/feed' import {UserAvatar} from '#/view/com/util/UserAvatar' -import {VideoFeedSourceContext} from '#/screens/VideoFeed/types' +import {type VideoFeedSourceContext} from '#/screens/VideoFeed/types' import {atoms as a, useBreakpoints} from '#/alf' -import {Button, ButtonProps} from '#/components/Button' +import {Button, type ButtonProps} from '#/components/Button' import {ArrowLeft_Stroke2_Corner0_Rounded as ArrowLeft} from '#/components/icons/Arrow' import * as Layout from '#/components/Layout' import {BUTTON_VISUAL_ALIGNMENT_OFFSET} from '#/components/Layout/const' diff --git a/src/screens/VideoFeed/types.ts b/src/screens/VideoFeed/types.ts index 2ab854bb3..7a3e1fd96 100644 --- a/src/screens/VideoFeed/types.ts +++ b/src/screens/VideoFeed/types.ts @@ -1,4 +1,4 @@ -import {AuthorFilter} from '#/state/queries/post-feed' +import {type AuthorFilter} from '#/state/queries/post-feed' /** * Kind of like `FeedDescriptor` but not diff --git a/src/state/messages/convo/util.ts b/src/state/messages/convo/util.ts index 92046cf1f..5301d10bb 100644 --- a/src/state/messages/convo/util.ts +++ b/src/state/messages/convo/util.ts @@ -1,9 +1,9 @@ import { - ConvoState, - ConvoStateBackgrounded, - ConvoStateDisabled, - ConvoStateReady, - ConvoStateSuspended, + type ConvoState, + type ConvoStateBackgrounded, + type ConvoStateDisabled, + type ConvoStateReady, + type ConvoStateSuspended, ConvoStatus, } from './types' diff --git a/src/state/messages/events/types.ts b/src/state/messages/events/types.ts index 305418bd3..038684319 100644 --- a/src/state/messages/events/types.ts +++ b/src/state/messages/events/types.ts @@ -1,4 +1,4 @@ -import {BskyAgent, ChatBskyConvoGetLog} from '@atproto/api' +import {type BskyAgent, type ChatBskyConvoGetLog} from '@atproto/api' export type MessagesEventBusParams = { agent: BskyAgent diff --git a/src/state/messages/index.tsx b/src/state/messages/index.tsx index 8924e63e4..8be875232 100644 --- a/src/state/messages/index.tsx +++ b/src/state/messages/index.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type React from 'react' import {CurrentConvoIdProvider} from '#/state/messages/current-convo-id' import {MessagesEventBusProvider} from '#/state/messages/events' diff --git a/src/state/persisted/index.web.ts b/src/state/persisted/index.web.ts index f28b19771..49fa224c0 100644 --- a/src/state/persisted/index.web.ts +++ b/src/state/persisted/index.web.ts @@ -4,11 +4,11 @@ import BroadcastChannel from '#/lib/broadcast' import {logger} from '#/logger' import { defaults, - Schema, + type Schema, tryParse, tryStringify, } from '#/state/persisted/schema' -import {PersistedApi} from './types' +import {type PersistedApi} from './types' import {normalizeData} from './util' export type {PersistedAccount, Schema} from '#/state/persisted/schema' diff --git a/src/state/persisted/types.ts b/src/state/persisted/types.ts index fd39079bf..d1fdfc26c 100644 --- a/src/state/persisted/types.ts +++ b/src/state/persisted/types.ts @@ -1,4 +1,4 @@ -import type {Schema} from './schema' +import {type Schema} from './schema' export type PersistedApi = { init(): Promise diff --git a/src/state/persisted/util.ts b/src/state/persisted/util.ts index 64a8bf945..184d9af3a 100644 --- a/src/state/persisted/util.ts +++ b/src/state/persisted/util.ts @@ -2,7 +2,7 @@ import {parse} from 'bcp-47' import {dedupArray} from '#/lib/functions' import {logger} from '#/logger' -import {Schema} from '#/state/persisted/schema' +import {type Schema} from '#/state/persisted/schema' export function normalizeData(data: Schema) { const next = {...data} diff --git a/src/state/preferences/index.tsx b/src/state/preferences/index.tsx index 8530a8d0c..740ea4bf3 100644 --- a/src/state/preferences/index.tsx +++ b/src/state/preferences/index.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type React from 'react' import {Provider as AltTextRequiredProvider} from './alt-text-required' import {Provider as AutoplayProvider} from './autoplay' diff --git a/src/state/queries/actor-autocomplete.ts b/src/state/queries/actor-autocomplete.ts index acc046771..80f7dfabd 100644 --- a/src/state/queries/actor-autocomplete.ts +++ b/src/state/queries/actor-autocomplete.ts @@ -1,5 +1,9 @@ import React from 'react' -import {AppBskyActorDefs, moderateProfile, ModerationOpts} from '@atproto/api' +import { + type AppBskyActorDefs, + moderateProfile, + type ModerationOpts, +} from '@atproto/api' import {keepPreviousData, useQuery, useQueryClient} from '@tanstack/react-query' import {isJustAMute, moduiContainsHideableOffense} from '#/lib/moderation' diff --git a/src/state/queries/app-passwords.ts b/src/state/queries/app-passwords.ts index bbf2dea97..12d66dd2c 100644 --- a/src/state/queries/app-passwords.ts +++ b/src/state/queries/app-passwords.ts @@ -1,4 +1,4 @@ -import {ComAtprotoServerCreateAppPassword} from '@atproto/api' +import {type ComAtprotoServerCreateAppPassword} from '@atproto/api' import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query' import {STALE} from '#/state/queries' diff --git a/src/state/queries/invites.ts b/src/state/queries/invites.ts index fdccac8cb..ed7fc534f 100644 --- a/src/state/queries/invites.ts +++ b/src/state/queries/invites.ts @@ -1,4 +1,4 @@ -import {ComAtprotoServerDefs} from '@atproto/api' +import {type ComAtprotoServerDefs} from '@atproto/api' import {useQuery} from '@tanstack/react-query' import {cleanError} from '#/lib/strings/errors' diff --git a/src/state/queries/known-followers.ts b/src/state/queries/known-followers.ts index fedd9b40f..05bbd5e67 100644 --- a/src/state/queries/known-followers.ts +++ b/src/state/queries/known-followers.ts @@ -1,8 +1,11 @@ -import {AppBskyActorDefs, AppBskyGraphGetKnownFollowers} from '@atproto/api' import { - InfiniteData, - QueryClient, - QueryKey, + type AppBskyActorDefs, + type AppBskyGraphGetKnownFollowers, +} from '@atproto/api' +import { + type InfiniteData, + type QueryClient, + type QueryKey, useInfiniteQuery, } from '@tanstack/react-query' diff --git a/src/state/queries/my-blocked-accounts.ts b/src/state/queries/my-blocked-accounts.ts index 05a78825f..a2e29136f 100644 --- a/src/state/queries/my-blocked-accounts.ts +++ b/src/state/queries/my-blocked-accounts.ts @@ -1,8 +1,8 @@ -import {AppBskyActorDefs, AppBskyGraphGetBlocks} from '@atproto/api' +import {type AppBskyActorDefs, type AppBskyGraphGetBlocks} from '@atproto/api' import { - InfiniteData, - QueryClient, - QueryKey, + type InfiniteData, + type QueryClient, + type QueryKey, useInfiniteQuery, } from '@tanstack/react-query' diff --git a/src/state/queries/my-lists.ts b/src/state/queries/my-lists.ts index 0f8721c61..aeb9cf456 100644 --- a/src/state/queries/my-lists.ts +++ b/src/state/queries/my-lists.ts @@ -1,5 +1,5 @@ -import {AppBskyGraphDefs} from '@atproto/api' -import {QueryClient, useQuery} from '@tanstack/react-query' +import {type AppBskyGraphDefs} from '@atproto/api' +import {type QueryClient, useQuery} from '@tanstack/react-query' import {accumulate} from '#/lib/async/accumulate' import {STALE} from '#/state/queries' diff --git a/src/state/queries/my-muted-accounts.ts b/src/state/queries/my-muted-accounts.ts index 5fb0fa79b..bf36b9029 100644 --- a/src/state/queries/my-muted-accounts.ts +++ b/src/state/queries/my-muted-accounts.ts @@ -1,8 +1,8 @@ -import {AppBskyActorDefs, AppBskyGraphGetMutes} from '@atproto/api' +import {type AppBskyActorDefs, type AppBskyGraphGetMutes} from '@atproto/api' import { - InfiniteData, - QueryClient, - QueryKey, + type InfiniteData, + type QueryClient, + type QueryKey, useInfiniteQuery, } from '@tanstack/react-query' diff --git a/src/state/queries/nuxs/types.ts b/src/state/queries/nuxs/types.ts index 2331582a1..475bdd942 100644 --- a/src/state/queries/nuxs/types.ts +++ b/src/state/queries/nuxs/types.ts @@ -1,4 +1,4 @@ -import {AppBskyActorDefs} from '@atproto/api' +import {type AppBskyActorDefs} from '@atproto/api' export type Data = Record | undefined diff --git a/src/state/queries/nuxs/util.ts b/src/state/queries/nuxs/util.ts index d65b86a34..ef323b422 100644 --- a/src/state/queries/nuxs/util.ts +++ b/src/state/queries/nuxs/util.ts @@ -1,8 +1,8 @@ -import {AppBskyActorDefs, nuxSchema} from '@atproto/api' +import {type AppBskyActorDefs, nuxSchema} from '@atproto/api' import { - AppNux, - Nux, + type AppNux, + type Nux, nuxNames, NuxSchemas, } from '#/state/queries/nuxs/definitions' diff --git a/src/state/queries/post-interaction-settings.ts b/src/state/queries/post-interaction-settings.ts index a256f2956..6f2b7d908 100644 --- a/src/state/queries/post-interaction-settings.ts +++ b/src/state/queries/post-interaction-settings.ts @@ -1,4 +1,4 @@ -import {AppBskyActorDefs} from '@atproto/api' +import {type AppBskyActorDefs} from '@atproto/api' import {useMutation, useQueryClient} from '@tanstack/react-query' import {preferencesQueryKey} from '#/state/queries/preferences' diff --git a/src/state/queries/post-liked-by.ts b/src/state/queries/post-liked-by.ts index ab9f5c7bb..e02de6153 100644 --- a/src/state/queries/post-liked-by.ts +++ b/src/state/queries/post-liked-by.ts @@ -1,8 +1,8 @@ -import {AppBskyActorDefs, AppBskyFeedGetLikes} from '@atproto/api' +import {type AppBskyActorDefs, type AppBskyFeedGetLikes} from '@atproto/api' import { - InfiniteData, - QueryClient, - QueryKey, + type InfiniteData, + type QueryClient, + type QueryKey, useInfiniteQuery, } from '@tanstack/react-query' diff --git a/src/state/queries/post-quotes.ts b/src/state/queries/post-quotes.ts index af9699d2b..1d0fa07e8 100644 --- a/src/state/queries/post-quotes.ts +++ b/src/state/queries/post-quotes.ts @@ -1,14 +1,14 @@ import { - AppBskyActorDefs, + type AppBskyActorDefs, AppBskyEmbedRecord, - AppBskyFeedDefs, - AppBskyFeedGetQuotes, + type AppBskyFeedDefs, + type AppBskyFeedGetQuotes, AtUri, } from '@atproto/api' import { - InfiniteData, - QueryClient, - QueryKey, + type InfiniteData, + type QueryClient, + type QueryKey, useInfiniteQuery, } from '@tanstack/react-query' diff --git a/src/state/queries/post-reposted-by.ts b/src/state/queries/post-reposted-by.ts index a27f203dd..814a815aa 100644 --- a/src/state/queries/post-reposted-by.ts +++ b/src/state/queries/post-reposted-by.ts @@ -1,8 +1,11 @@ -import {AppBskyActorDefs, AppBskyFeedGetRepostedBy} from '@atproto/api' import { - InfiniteData, - QueryClient, - QueryKey, + type AppBskyActorDefs, + type AppBskyFeedGetRepostedBy, +} from '@atproto/api' +import { + type InfiniteData, + type QueryClient, + type QueryKey, useInfiniteQuery, } from '@tanstack/react-query' diff --git a/src/state/queries/preferences/types.ts b/src/state/queries/preferences/types.ts index 8f523fcf2..fbe6a7e33 100644 --- a/src/state/queries/preferences/types.ts +++ b/src/state/queries/preferences/types.ts @@ -1,7 +1,7 @@ import { - BskyFeedViewPreference, - BskyPreferences, - BskyThreadViewPreference, + type BskyFeedViewPreference, + type BskyPreferences, + type BskyThreadViewPreference, } from '@atproto/api' export type UsePreferencesQueryResponse = Omit< diff --git a/src/state/queries/profile-feedgens.ts b/src/state/queries/profile-feedgens.ts index 79d9735c9..7d224e519 100644 --- a/src/state/queries/profile-feedgens.ts +++ b/src/state/queries/profile-feedgens.ts @@ -1,5 +1,12 @@ -import {AppBskyFeedGetActorFeeds, moderateFeedGenerator} from '@atproto/api' -import {InfiniteData, QueryKey, useInfiniteQuery} from '@tanstack/react-query' +import { + type AppBskyFeedGetActorFeeds, + moderateFeedGenerator, +} from '@atproto/api' +import { + type InfiniteData, + type QueryKey, + useInfiniteQuery, +} from '@tanstack/react-query' import {useAgent} from '#/state/session' import {useModerationOpts} from '../preferences/moderation-opts' diff --git a/src/state/queries/profile-followers.ts b/src/state/queries/profile-followers.ts index 131343cd1..9c4c5182a 100644 --- a/src/state/queries/profile-followers.ts +++ b/src/state/queries/profile-followers.ts @@ -1,8 +1,11 @@ -import {AppBskyActorDefs, AppBskyGraphGetFollowers} from '@atproto/api' import { - InfiniteData, - QueryClient, - QueryKey, + type AppBskyActorDefs, + type AppBskyGraphGetFollowers, +} from '@atproto/api' +import { + type InfiniteData, + type QueryClient, + type QueryKey, useInfiniteQuery, } from '@tanstack/react-query' diff --git a/src/state/queries/profile-follows.ts b/src/state/queries/profile-follows.ts index 6d832a841..1b154793d 100644 --- a/src/state/queries/profile-follows.ts +++ b/src/state/queries/profile-follows.ts @@ -1,8 +1,8 @@ -import {AppBskyActorDefs, AppBskyGraphGetFollows} from '@atproto/api' +import {type AppBskyActorDefs, type AppBskyGraphGetFollows} from '@atproto/api' import { - InfiniteData, - QueryClient, - QueryKey, + type InfiniteData, + type QueryClient, + type QueryKey, useInfiniteQuery, } from '@tanstack/react-query' diff --git a/src/state/queries/profile-lists.ts b/src/state/queries/profile-lists.ts index 5c9f9f0d6..a881977ff 100644 --- a/src/state/queries/profile-lists.ts +++ b/src/state/queries/profile-lists.ts @@ -1,5 +1,9 @@ -import {AppBskyGraphGetLists, moderateUserList} from '@atproto/api' -import {InfiniteData, QueryKey, useInfiniteQuery} from '@tanstack/react-query' +import {type AppBskyGraphGetLists, moderateUserList} from '@atproto/api' +import { + type InfiniteData, + type QueryKey, + useInfiniteQuery, +} from '@tanstack/react-query' import {useAgent} from '#/state/session' import {useModerationOpts} from '../preferences/moderation-opts' diff --git a/src/state/queries/resolve-link.ts b/src/state/queries/resolve-link.ts index 5856cfb5f..09dc739c0 100644 --- a/src/state/queries/resolve-link.ts +++ b/src/state/queries/resolve-link.ts @@ -1,4 +1,4 @@ -import {QueryClient, useQuery} from '@tanstack/react-query' +import {type QueryClient, useQuery} from '@tanstack/react-query' import {STALE} from '#/state/queries/index' import {useAgent} from '../session' @@ -9,10 +9,10 @@ export const RQKEY_LINK = (url: string) => [RQKEY_LINK_ROOT, url] const RQKEY_GIF_ROOT = 'resolve-gif' export const RQKEY_GIF = (url: string) => [RQKEY_GIF_ROOT, url] -import {BskyAgent} from '@atproto/api' +import {type BskyAgent} from '@atproto/api' -import {ResolvedLink, resolveGif, resolveLink} from '#/lib/api/resolve' -import {Gif} from './tenor' +import {type ResolvedLink, resolveGif, resolveLink} from '#/lib/api/resolve' +import {type Gif} from './tenor' export function useResolveLinkQuery(url: string) { const agent = useAgent() diff --git a/src/state/queries/resolve-uri.ts b/src/state/queries/resolve-uri.ts index 1422a2dae..850fb3fb6 100644 --- a/src/state/queries/resolve-uri.ts +++ b/src/state/queries/resolve-uri.ts @@ -1,5 +1,9 @@ import {AtUri} from '@atproto/api' -import {QueryClient, useQuery, UseQueryResult} from '@tanstack/react-query' +import { + type QueryClient, + useQuery, + type UseQueryResult, +} from '@tanstack/react-query' import {STALE} from '#/state/queries' import {useAgent} from '#/state/session' diff --git a/src/state/queries/search-posts.ts b/src/state/queries/search-posts.ts index 9cc6e2f35..e7ebae0ec 100644 --- a/src/state/queries/search-posts.ts +++ b/src/state/queries/search-posts.ts @@ -1,15 +1,15 @@ import React from 'react' import { - AppBskyActorDefs, - AppBskyFeedDefs, - AppBskyFeedSearchPosts, + type AppBskyActorDefs, + type AppBskyFeedDefs, + type AppBskyFeedSearchPosts, AtUri, moderatePost, } from '@atproto/api' import { - InfiniteData, - QueryClient, - QueryKey, + type InfiniteData, + type QueryClient, + type QueryKey, useInfiniteQuery, } from '@tanstack/react-query' diff --git a/src/state/queries/suggested-feeds.ts b/src/state/queries/suggested-feeds.ts index 19614c2cb..9344cf628 100644 --- a/src/state/queries/suggested-feeds.ts +++ b/src/state/queries/suggested-feeds.ts @@ -1,5 +1,9 @@ -import {AppBskyFeedGetSuggestedFeeds} from '@atproto/api' -import {InfiniteData, QueryKey, useInfiniteQuery} from '@tanstack/react-query' +import {type AppBskyFeedGetSuggestedFeeds} from '@atproto/api' +import { + type InfiniteData, + type QueryKey, + useInfiniteQuery, +} from '@tanstack/react-query' import {STALE} from '#/state/queries' import {useAgent} from '#/state/session' diff --git a/src/state/queries/threadgate/index.ts b/src/state/queries/threadgate/index.ts index 478658fe8..eeb9f7035 100644 --- a/src/state/queries/threadgate/index.ts +++ b/src/state/queries/threadgate/index.ts @@ -1,9 +1,9 @@ import { AppBskyFeedDefs, - AppBskyFeedGetPostThread, + type AppBskyFeedGetPostThread, AppBskyFeedThreadgate, AtUri, - BskyAgent, + type BskyAgent, } from '@atproto/api' import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query' @@ -11,7 +11,7 @@ import {networkRetry, retry} from '#/lib/async/retry' import {until} from '#/lib/async/until' import {STALE} from '#/state/queries' import {RQKEY_ROOT as postThreadQueryKeyRoot} from '#/state/queries/post-thread' -import {ThreadgateAllowUISetting} from '#/state/queries/threadgate/types' +import {type ThreadgateAllowUISetting} from '#/state/queries/threadgate/types' import { createThreadgateRecord, mergeThreadgateRecords, diff --git a/src/state/queries/threadgate/util.ts b/src/state/queries/threadgate/util.ts index cbe8d4695..807afef76 100644 --- a/src/state/queries/threadgate/util.ts +++ b/src/state/queries/threadgate/util.ts @@ -1,6 +1,6 @@ -import {AppBskyFeedDefs, AppBskyFeedThreadgate} from '@atproto/api' +import {type AppBskyFeedDefs, AppBskyFeedThreadgate} from '@atproto/api' -import {ThreadgateAllowUISetting} from '#/state/queries/threadgate/types' +import {type ThreadgateAllowUISetting} from '#/state/queries/threadgate/types' import * as bsky from '#/types/bsky' export function threadgateViewToAllowUISetting( diff --git a/src/state/queries/unstable-profile-cache.ts b/src/state/queries/unstable-profile-cache.ts index 4ac5001b7..72c3f86b8 100644 --- a/src/state/queries/unstable-profile-cache.ts +++ b/src/state/queries/unstable-profile-cache.ts @@ -1,7 +1,7 @@ import {useCallback} from 'react' -import {QueryClient, useQueryClient} from '@tanstack/react-query' +import {type QueryClient, useQueryClient} from '@tanstack/react-query' -import * as bsky from '#/types/bsky' +import type * as bsky from '#/types/bsky' const unstableProfileViewCacheQueryKeyRoot = 'unstableProfileViewCache' export const unstableProfileViewCacheQueryKey = (didOrHandle: string) => [ diff --git a/src/state/queries/util.ts b/src/state/queries/util.ts index 71d185bec..363b6b6e0 100644 --- a/src/state/queries/util.ts +++ b/src/state/queries/util.ts @@ -1,12 +1,16 @@ import { - AppBskyActorDefs, + type AppBskyActorDefs, AppBskyEmbedRecord, AppBskyEmbedRecordWithMedia, - AppBskyFeedDefs, + type AppBskyFeedDefs, AppBskyFeedPost, - AtUri, + type AtUri, } from '@atproto/api' -import {InfiniteData, QueryClient, QueryKey} from '@tanstack/react-query' +import { + type InfiniteData, + type QueryClient, + type QueryKey, +} from '@tanstack/react-query' import * as bsky from '#/types/bsky' diff --git a/src/state/session/__tests__/session-test.ts b/src/state/session/__tests__/session-test.ts index dec8ec48b..c58171bf9 100644 --- a/src/state/session/__tests__/session-test.ts +++ b/src/state/session/__tests__/session-test.ts @@ -2,7 +2,7 @@ import {BskyAgent} from '@atproto/api' import {describe, expect, it, jest} from '@jest/globals' import {agentToSessionAccountOrThrow} from '../agent' -import {Action, getInitialState, reducer, State} from '../reducer' +import {type Action, getInitialState, reducer, type State} from '../reducer' jest.mock('jwt-decode', () => ({ jwtDecode(_token: string) { diff --git a/src/state/session/moderation.ts b/src/state/session/moderation.ts index 01684fe0b..64e36da9d 100644 --- a/src/state/session/moderation.ts +++ b/src/state/session/moderation.ts @@ -3,7 +3,7 @@ import {BSKY_LABELER_DID, BskyAgent} from '@atproto/api' import {IS_TEST_USER} from '#/lib/constants' import {configureAdditionalModerationAuthorities} from './additional-moderation-authorities' import {readLabelers} from './agent-config' -import {SessionAccount} from './types' +import {type SessionAccount} from './types' export function configureModerationForGuest() { // This global mutation is *only* OK because this code is only relevant for testing. diff --git a/src/state/session/util.ts b/src/state/session/util.ts index 3a5909e82..c1d66f793 100644 --- a/src/state/session/util.ts +++ b/src/state/session/util.ts @@ -3,7 +3,7 @@ import {jwtDecode} from 'jwt-decode' import {hasProp} from '#/lib/type-guards' import {logger} from '#/logger' import * as persisted from '#/state/persisted' -import {SessionAccount} from './types' +import {type SessionAccount} from './types' export function readLastActiveAccount() { const {currentAccount, accounts} = persisted.get('session') diff --git a/src/state/shell/reminders.ts b/src/state/shell/reminders.ts index db6ee9391..002b38126 100644 --- a/src/state/shell/reminders.ts +++ b/src/state/shell/reminders.ts @@ -1,7 +1,7 @@ import {simpleAreDatesEqual} from '#/lib/strings/time' import {logger} from '#/logger' import * as persisted from '#/state/persisted' -import {SessionAccount} from '../session' +import {type SessionAccount} from '../session' import {isOnboardingActive} from './onboarding' export function shouldRequestEmailConfirmation(account: SessionAccount) { diff --git a/src/types/bsky/index.ts b/src/types/bsky/index.ts index d5acbdbb5..d482f9515 100644 --- a/src/types/bsky/index.ts +++ b/src/types/bsky/index.ts @@ -1,4 +1,4 @@ -import {ValidationResult} from '@atproto/lexicon' +import {type ValidationResult} from '@atproto/lexicon' export * as post from '#/types/bsky/post' export * as profile from '#/types/bsky/profile' diff --git a/src/types/bsky/post.ts b/src/types/bsky/post.ts index 61b63dce7..fada39da8 100644 --- a/src/types/bsky/post.ts +++ b/src/types/bsky/post.ts @@ -1,5 +1,5 @@ import { - $Typed, + type $Typed, AppBskyEmbedExternal, AppBskyEmbedImages, AppBskyEmbedRecord, diff --git a/src/view/com/composer/AltTextCounterWrapper.tsx b/src/view/com/composer/AltTextCounterWrapper.tsx index d69252f4b..da3c14920 100644 --- a/src/view/com/composer/AltTextCounterWrapper.tsx +++ b/src/view/com/composer/AltTextCounterWrapper.tsx @@ -1,5 +1,5 @@ -import React from 'react' import {View} from 'react-native' +import type React from 'react' import {MAX_ALT_TEXT} from '#/lib/constants' import {CharProgress} from '#/view/com/composer/char-progress/CharProgress' diff --git a/src/view/com/composer/KeyboardAccessory.tsx b/src/view/com/composer/KeyboardAccessory.tsx index 983a87dae..f3fb761dc 100644 --- a/src/view/com/composer/KeyboardAccessory.tsx +++ b/src/view/com/composer/KeyboardAccessory.tsx @@ -1,7 +1,7 @@ -import React from 'react' import {View} from 'react-native' import {KeyboardStickyView} from 'react-native-keyboard-controller' import {useSafeAreaInsets} from 'react-native-safe-area-context' +import type React from 'react' import {isWeb} from '#/platform/detection' import {atoms as a, useTheme} from '#/alf' diff --git a/src/view/com/composer/char-progress/CharProgress.tsx b/src/view/com/composer/char-progress/CharProgress.tsx index f2734e4ec..8920132a5 100644 --- a/src/view/com/composer/char-progress/CharProgress.tsx +++ b/src/view/com/composer/char-progress/CharProgress.tsx @@ -1,4 +1,9 @@ -import {StyleProp, TextStyle, View, ViewStyle} from 'react-native' +import { + type StyleProp, + type TextStyle, + View, + type ViewStyle, +} from 'react-native' // @ts-ignore no type definition -prf import ProgressCircle from 'react-native-progress/Circle' // @ts-ignore no type definition -prf diff --git a/src/view/com/composer/photos/SelectGifBtn.tsx b/src/view/com/composer/photos/SelectGifBtn.tsx index 3fb0e00d2..65e0ed8ce 100644 --- a/src/view/com/composer/photos/SelectGifBtn.tsx +++ b/src/view/com/composer/photos/SelectGifBtn.tsx @@ -4,7 +4,7 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {logEvent} from '#/lib/statsig/statsig' -import {Gif} from '#/state/queries/tenor' +import {type Gif} from '#/state/queries/tenor' import {atoms as a, useTheme} from '#/alf' import {Button} from '#/components/Button' import {GifSelectDialog} from '#/components/dialogs/GifSelect' diff --git a/src/view/com/composer/text-input/text-input-util.ts b/src/view/com/composer/text-input/text-input-util.ts index 7268e10f0..71db8c323 100644 --- a/src/view/com/composer/text-input/text-input-util.ts +++ b/src/view/com/composer/text-input/text-input-util.ts @@ -1,4 +1,4 @@ -import {AppBskyRichtextFacet, RichText} from '@atproto/api' +import {type AppBskyRichtextFacet, type RichText} from '@atproto/api' export type LinkFacetMatch = { rt: RichText diff --git a/src/view/com/composer/text-input/web/LinkDecorator.ts b/src/view/com/composer/text-input/web/LinkDecorator.ts index af38d6b05..4843f0ddf 100644 --- a/src/view/com/composer/text-input/web/LinkDecorator.ts +++ b/src/view/com/composer/text-input/web/LinkDecorator.ts @@ -16,7 +16,7 @@ import {URL_REGEX} from '@atproto/api' import {Mark} from '@tiptap/core' -import {Node as ProsemirrorNode} from '@tiptap/pm/model' +import {type Node as ProsemirrorNode} from '@tiptap/pm/model' import {Plugin, PluginKey} from '@tiptap/pm/state' import {Decoration, DecorationSet} from '@tiptap/pm/view' diff --git a/src/view/com/composer/text-input/web/TagDecorator.ts b/src/view/com/composer/text-input/web/TagDecorator.ts index 9225fd6bf..5af70de6d 100644 --- a/src/view/com/composer/text-input/web/TagDecorator.ts +++ b/src/view/com/composer/text-input/web/TagDecorator.ts @@ -16,7 +16,7 @@ import {TAG_REGEX, TRAILING_PUNCTUATION_REGEX} from '@atproto/api' import {Mark} from '@tiptap/core' -import {Node as ProsemirrorNode} from '@tiptap/pm/model' +import {type Node as ProsemirrorNode} from '@tiptap/pm/model' import {Plugin, PluginKey} from '@tiptap/pm/state' import {Decoration, DecorationSet} from '@tiptap/pm/view' diff --git a/src/view/com/composer/threadgate/ThreadgateBtn.tsx b/src/view/com/composer/threadgate/ThreadgateBtn.tsx index 4130cc7e4..4f46351b2 100644 --- a/src/view/com/composer/threadgate/ThreadgateBtn.tsx +++ b/src/view/com/composer/threadgate/ThreadgateBtn.tsx @@ -1,11 +1,11 @@ -import {Keyboard, StyleProp, ViewStyle} from 'react-native' -import {AnimatedStyle} from 'react-native-reanimated' -import {AppBskyFeedPostgate} from '@atproto/api' +import {Keyboard, type StyleProp, type ViewStyle} from 'react-native' +import {type AnimatedStyle} from 'react-native-reanimated' +import {type AppBskyFeedPostgate} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {isNative} from '#/platform/detection' -import {ThreadgateAllowUISetting} from '#/state/queries/threadgate' +import {type ThreadgateAllowUISetting} from '#/state/queries/threadgate' import {native} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' diff --git a/src/view/com/composer/videos/SubtitleFilePicker.tsx b/src/view/com/composer/videos/SubtitleFilePicker.tsx index e49189f9b..256bc1600 100644 --- a/src/view/com/composer/videos/SubtitleFilePicker.tsx +++ b/src/view/com/composer/videos/SubtitleFilePicker.tsx @@ -1,7 +1,8 @@ -import React, {useRef} from 'react' +import {useRef} from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' +import type React from 'react' import {logger} from '#/logger' import * as Toast from '#/view/com/util/Toast' diff --git a/src/view/com/composer/videos/VideoPreview.web.tsx b/src/view/com/composer/videos/VideoPreview.web.tsx index f20f8b383..979fbf52f 100644 --- a/src/view/com/composer/videos/VideoPreview.web.tsx +++ b/src/view/com/composer/videos/VideoPreview.web.tsx @@ -1,9 +1,9 @@ import {View} from 'react-native' -import {ImagePickerAsset} from 'expo-image-picker' +import {type ImagePickerAsset} from 'expo-image-picker' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {CompressedVideo} from '#/lib/media/video/types' +import {type CompressedVideo} from '#/lib/media/video/types' import {clamp} from '#/lib/numbers' import {useAutoplayDisabled} from '#/state/preferences' import {ExternalEmbedRemoveBtn} from '#/view/com/composer/ExternalEmbedRemoveBtn' diff --git a/src/view/com/composer/videos/VideoTranscodeProgress.tsx b/src/view/com/composer/videos/VideoTranscodeProgress.tsx index f408be720..0a107d878 100644 --- a/src/view/com/composer/videos/VideoTranscodeProgress.tsx +++ b/src/view/com/composer/videos/VideoTranscodeProgress.tsx @@ -1,7 +1,7 @@ import {View} from 'react-native' // @ts-expect-error no type definition import ProgressPie from 'react-native-progress/Pie' -import {ImagePickerAsset} from 'expo-image-picker' +import {type ImagePickerAsset} from 'expo-image-picker' import {clamp} from '#/lib/numbers' import {isWeb} from '#/platform/detection' diff --git a/src/view/com/composer/videos/pickVideo.web.ts b/src/view/com/composer/videos/pickVideo.web.ts index 56a38fa56..c358727ef 100644 --- a/src/view/com/composer/videos/pickVideo.web.ts +++ b/src/view/com/composer/videos/pickVideo.web.ts @@ -1,4 +1,4 @@ -import {ImagePickerAsset, ImagePickerResult} from 'expo-image-picker' +import {type ImagePickerAsset, type ImagePickerResult} from 'expo-image-picker' import {SUPPORTED_MIME_TYPES} from '#/lib/constants' diff --git a/src/view/com/lightbox/ImageViewing/@types/index.ts b/src/view/com/lightbox/ImageViewing/@types/index.ts index 779b95bfc..55b3db8fe 100644 --- a/src/view/com/lightbox/ImageViewing/@types/index.ts +++ b/src/view/com/lightbox/ImageViewing/@types/index.ts @@ -6,8 +6,8 @@ * */ -import {TransformsStyle} from 'react-native' -import {MeasuredDimensions} from 'react-native-reanimated' +import {type TransformsStyle} from 'react-native' +import {type MeasuredDimensions} from 'react-native-reanimated' export type Dimensions = { width: number diff --git a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx index 3089b6d3f..cdee8a826 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * */ -import {StyleSheet, TouchableOpacity, ViewStyle} from 'react-native' +import {StyleSheet, TouchableOpacity, type ViewStyle} from 'react-native' import {SafeAreaView} from 'react-native-safe-area-context' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {msg} from '@lingui/macro' diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx index 925158773..9ce3f5242 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx @@ -3,11 +3,11 @@ import {ActivityIndicator, StyleSheet} from 'react-native' import { Gesture, GestureDetector, - PanGesture, + type PanGesture, } from 'react-native-gesture-handler' import Animated, { runOnJS, - SharedValue, + type SharedValue, useAnimatedReaction, useAnimatedRef, useAnimatedStyle, @@ -16,10 +16,10 @@ import Animated, { } from 'react-native-reanimated' import {Image} from 'expo-image' -import type { - Dimensions as ImageDimensions, - ImageSource, - Transform, +import { + type Dimensions as ImageDimensions, + type ImageSource, + type Transform, } from '../../@types' import { applyRounding, @@ -28,7 +28,7 @@ import { prependPinch, prependTransform, readTransform, - TransformMatrix, + type TransformMatrix, } from '../../transforms' const MIN_SCREEN_ZOOM = 2 diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx index c103e131b..c8bf1fcce 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx @@ -11,11 +11,11 @@ import {ActivityIndicator, StyleSheet} from 'react-native' import { Gesture, GestureDetector, - PanGesture, + type PanGesture, } from 'react-native-gesture-handler' import Animated, { runOnJS, - SharedValue, + type SharedValue, useAnimatedProps, useAnimatedReaction, useAnimatedRef, @@ -27,9 +27,9 @@ import {Image} from 'expo-image' import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED' import { - Dimensions as ImageDimensions, - ImageSource, - Transform, + type Dimensions as ImageDimensions, + type ImageSource, + type Transform, } from '../../@types' const MAX_ORIGINAL_IMAGE_ZOOM = 2 diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx index b41e16383..c33151723 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx @@ -2,14 +2,14 @@ import React from 'react' import {View} from 'react-native' -import {PanGesture} from 'react-native-gesture-handler' -import {SharedValue} from 'react-native-reanimated' +import {type PanGesture} from 'react-native-gesture-handler' +import {type SharedValue} from 'react-native-reanimated' -import {Dimensions} from '#/lib/media/types' +import {type Dimensions} from '#/lib/media/types' import { - Dimensions as ImageDimensions, - ImageSource, - Transform, + type Dimensions as ImageDimensions, + type ImageSource, + type Transform, } from '../../@types' type Props = { diff --git a/src/view/com/lightbox/ImageViewing/transforms.ts b/src/view/com/lightbox/ImageViewing/transforms.ts index 05476678f..ae6e4aed8 100644 --- a/src/view/com/lightbox/ImageViewing/transforms.ts +++ b/src/view/com/lightbox/ImageViewing/transforms.ts @@ -1,4 +1,4 @@ -import type {Position} from './@types' +import {type Position} from './@types' export type TransformMatrix = [ number, diff --git a/src/view/com/modals/InviteCodes.tsx b/src/view/com/modals/InviteCodes.tsx index 60020f996..93f749062 100644 --- a/src/view/com/modals/InviteCodes.tsx +++ b/src/view/com/modals/InviteCodes.tsx @@ -6,10 +6,10 @@ import { View, } from 'react-native' import {setStringAsync} from 'expo-clipboard' -import {ComAtprotoServerDefs} from '@atproto/api' +import {type ComAtprotoServerDefs} from '@atproto/api' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -22,7 +22,7 @@ import {isWeb} from '#/platform/detection' import {useInvitesAPI, useInvitesState} from '#/state/invites' import {useModalControls} from '#/state/modals' import { - InviteCodesQueryResponse, + type InviteCodesQueryResponse, useInviteCodesQuery, } from '#/state/queries/invites' import {ErrorMessage} from '../util/error/ErrorMessage' diff --git a/src/view/com/modals/UserAddRemoveLists.tsx b/src/view/com/modals/UserAddRemoveLists.tsx index b0b76644f..7c20b50c7 100644 --- a/src/view/com/modals/UserAddRemoveLists.tsx +++ b/src/view/com/modals/UserAddRemoveLists.tsx @@ -5,7 +5,7 @@ import { useWindowDimensions, View, } from 'react-native' -import {AppBskyGraphDefs as GraphDefs} from '@atproto/api' +import {type AppBskyGraphDefs as GraphDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -18,7 +18,7 @@ import {isAndroid, isMobileWeb, isWeb} from '#/platform/detection' import {useModalControls} from '#/state/modals' import { getMembership, - ListMembersip, + type ListMembersip, useDangerousListMembershipsQuery, useListMembershipAddMutation, useListMembershipRemoveMutation, diff --git a/src/view/com/post-thread/PostLikedBy.tsx b/src/view/com/post-thread/PostLikedBy.tsx index b9051a9c6..d6c41ced1 100644 --- a/src/view/com/post-thread/PostLikedBy.tsx +++ b/src/view/com/post-thread/PostLikedBy.tsx @@ -1,5 +1,5 @@ import {useCallback, useMemo, useState} from 'react' -import {AppBskyFeedGetLikes as GetLikes} from '@atproto/api' +import {type AppBskyFeedGetLikes as GetLikes} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/post-thread/PostQuotes.tsx b/src/view/com/post-thread/PostQuotes.tsx index 82619a8a5..8f178968d 100644 --- a/src/view/com/post-thread/PostQuotes.tsx +++ b/src/view/com/post-thread/PostQuotes.tsx @@ -1,9 +1,9 @@ import {useCallback, useState} from 'react' import { - AppBskyFeedDefs, + type AppBskyFeedDefs, AppBskyFeedPost, moderatePost, - ModerationDecision, + type ModerationDecision, } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/post-thread/PostRepostedBy.tsx b/src/view/com/post-thread/PostRepostedBy.tsx index c27e37f49..e15d9a0f1 100644 --- a/src/view/com/post-thread/PostRepostedBy.tsx +++ b/src/view/com/post-thread/PostRepostedBy.tsx @@ -1,5 +1,5 @@ import {useCallback, useMemo, useState} from 'react' -import {AppBskyActorDefs as ActorDefs} from '@atproto/api' +import {type AppBskyActorDefs as ActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/posts/CustomFeedEmptyState.tsx b/src/view/com/posts/CustomFeedEmptyState.tsx index 1d216dd29..580e5b2e4 100644 --- a/src/view/com/posts/CustomFeedEmptyState.tsx +++ b/src/view/com/posts/CustomFeedEmptyState.tsx @@ -2,14 +2,14 @@ import React from 'react' import {StyleSheet, View} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {Trans} from '@lingui/macro' import {useNavigation} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' import {MagnifyingGlassIcon} from '#/lib/icons' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {s} from '#/lib/styles' import {isWeb} from '#/platform/detection' import {Button} from '../util/forms/Button' diff --git a/src/view/com/posts/FollowingEmptyState.tsx b/src/view/com/posts/FollowingEmptyState.tsx index 3f330b327..352cc1dc0 100644 --- a/src/view/com/posts/FollowingEmptyState.tsx +++ b/src/view/com/posts/FollowingEmptyState.tsx @@ -2,14 +2,14 @@ import React from 'react' import {StyleSheet, View} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {Trans} from '@lingui/macro' import {useNavigation} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' import {MagnifyingGlassIcon} from '#/lib/icons' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {s} from '#/lib/styles' import {isWeb} from '#/platform/detection' import {Button} from '../util/forms/Button' diff --git a/src/view/com/posts/FollowingEndOfFeed.tsx b/src/view/com/posts/FollowingEndOfFeed.tsx index 4abb3c1f5..e3c84d782 100644 --- a/src/view/com/posts/FollowingEndOfFeed.tsx +++ b/src/view/com/posts/FollowingEndOfFeed.tsx @@ -2,13 +2,13 @@ import React from 'react' import {Dimensions, StyleSheet, View} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {Trans} from '@lingui/macro' 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 {s} from '#/lib/styles' import {isWeb} from '#/platform/detection' import {Button} from '../util/forms/Button' diff --git a/src/view/com/profile/ProfileFollowers.tsx b/src/view/com/profile/ProfileFollowers.tsx index d6b764656..dfb63909e 100644 --- a/src/view/com/profile/ProfileFollowers.tsx +++ b/src/view/com/profile/ProfileFollowers.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {AppBskyActorDefs as ActorDefs} from '@atproto/api' +import {type AppBskyActorDefs as ActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/profile/ProfileFollows.tsx b/src/view/com/profile/ProfileFollows.tsx index d67a7261a..80aba11b2 100644 --- a/src/view/com/profile/ProfileFollows.tsx +++ b/src/view/com/profile/ProfileFollows.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {AppBskyActorDefs as ActorDefs} from '@atproto/api' +import {type AppBskyActorDefs as ActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/util/Alert.web.tsx b/src/view/com/util/Alert.web.tsx index bf2456504..448879173 100644 --- a/src/view/com/util/Alert.web.tsx +++ b/src/view/com/util/Alert.web.tsx @@ -1,4 +1,4 @@ -import {AlertButton, AlertStatic} from 'react-native' +import {type AlertButton, type AlertStatic} from 'react-native' class WebAlert implements Pick { public alert(title: string, message?: string, buttons?: AlertButton[]): void { diff --git a/src/view/com/util/BottomSheetCustomBackdrop.tsx b/src/view/com/util/BottomSheetCustomBackdrop.tsx index 86751861f..cacbfcc5a 100644 --- a/src/view/com/util/BottomSheetCustomBackdrop.tsx +++ b/src/view/com/util/BottomSheetCustomBackdrop.tsx @@ -1,13 +1,14 @@ -import React, {useMemo} from 'react' +import {useMemo} from 'react' import {TouchableWithoutFeedback} from 'react-native' import Animated, { Extrapolation, interpolate, useAnimatedStyle, } from 'react-native-reanimated' -import {BottomSheetBackdropProps} from '@discord/bottom-sheet/src' +import {type BottomSheetBackdropProps} from '@discord/bottom-sheet/src' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' +import type React from 'react' export function createCustomBackdrop( onClose?: (() => void) | undefined, diff --git a/src/view/com/util/EmptyState.tsx b/src/view/com/util/EmptyState.tsx index 6b2600a40..a3d740e13 100644 --- a/src/view/com/util/EmptyState.tsx +++ b/src/view/com/util/EmptyState.tsx @@ -1,8 +1,8 @@ -import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native' -import {IconProp} from '@fortawesome/fontawesome-svg-core' +import {type StyleProp, StyleSheet, View, type ViewStyle} from 'react-native' +import {type IconProp} from '@fortawesome/fontawesome-svg-core' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/com/util/EmptyStateWithButton.tsx b/src/view/com/util/EmptyStateWithButton.tsx index fcac6df08..5c6ce94a6 100644 --- a/src/view/com/util/EmptyStateWithButton.tsx +++ b/src/view/com/util/EmptyStateWithButton.tsx @@ -1,8 +1,8 @@ import {StyleSheet, View} from 'react-native' -import {IconProp} from '@fortawesome/fontawesome-svg-core' +import {type IconProp} from '@fortawesome/fontawesome-svg-core' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/com/util/ErrorBoundary.tsx b/src/view/com/util/ErrorBoundary.tsx index c4211ffbc..87e351f5e 100644 --- a/src/view/com/util/ErrorBoundary.tsx +++ b/src/view/com/util/ErrorBoundary.tsx @@ -1,5 +1,5 @@ -import {Component, ErrorInfo, ReactNode} from 'react' -import {StyleProp, ViewStyle} from 'react-native' +import {Component, type ErrorInfo, type ReactNode} from 'react' +import {type StyleProp, type ViewStyle} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/util/FeedInfoText.tsx b/src/view/com/util/FeedInfoText.tsx index 55eb1bad4..3ad05facb 100644 --- a/src/view/com/util/FeedInfoText.tsx +++ b/src/view/com/util/FeedInfoText.tsx @@ -1,7 +1,7 @@ -import {StyleProp, StyleSheet, TextStyle} from 'react-native' +import {type StyleProp, StyleSheet, type TextStyle} from 'react-native' import {sanitizeDisplayName} from '#/lib/strings/display-names' -import {TypographyVariant} from '#/lib/ThemeContext' +import {type TypographyVariant} from '#/lib/ThemeContext' import {useFeedSourceInfoQuery} from '#/state/queries/feed' import {TextLinkOnWebOnly} from './Link' import {LoadingPlaceholder} from './LoadingPlaceholder' diff --git a/src/view/com/util/LoadMoreRetryBtn.tsx b/src/view/com/util/LoadMoreRetryBtn.tsx index 07bd733ea..240d5aa34 100644 --- a/src/view/com/util/LoadMoreRetryBtn.tsx +++ b/src/view/com/util/LoadMoreRetryBtn.tsx @@ -1,7 +1,7 @@ import {StyleSheet} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/com/util/MainScrollProvider.tsx b/src/view/com/util/MainScrollProvider.tsx index e2538eaab..d8596b6f3 100644 --- a/src/view/com/util/MainScrollProvider.tsx +++ b/src/view/com/util/MainScrollProvider.tsx @@ -1,5 +1,5 @@ import React, {useCallback, useEffect} from 'react' -import {NativeScrollEvent} from 'react-native' +import {type NativeScrollEvent} from 'react-native' import {interpolate, useSharedValue, withSpring} from 'react-native-reanimated' import EventEmitter from 'eventemitter3' diff --git a/src/view/com/util/PressableWithHover.tsx b/src/view/com/util/PressableWithHover.tsx index 19a1968cc..f4006a526 100644 --- a/src/view/com/util/PressableWithHover.tsx +++ b/src/view/com/util/PressableWithHover.tsx @@ -1,6 +1,11 @@ -import {forwardRef, PropsWithChildren} from 'react' -import {Pressable, PressableProps, StyleProp, ViewStyle} from 'react-native' -import {View} from 'react-native' +import {forwardRef, type PropsWithChildren} from 'react' +import { + Pressable, + type PressableProps, + type StyleProp, + type ViewStyle, +} from 'react-native' +import {type View} from 'react-native' import {addStyle} from '#/lib/styles' import {useInteractionState} from '#/components/hooks/useInteractionState' diff --git a/src/view/com/util/Views.tsx b/src/view/com/util/Views.tsx index c9ba0728c..38c3f2090 100644 --- a/src/view/com/util/Views.tsx +++ b/src/view/com/util/Views.tsx @@ -1,8 +1,8 @@ import {forwardRef} from 'react' -import {FlatListComponent} from 'react-native' -import {View, ViewProps} from 'react-native' +import {type FlatListComponent} from 'react-native' +import {View, type ViewProps} from 'react-native' import Animated from 'react-native-reanimated' -import {FlatListPropsWithLayout} from 'react-native-reanimated' +import {type FlatListPropsWithLayout} from 'react-native-reanimated' // If you explode these into functions, don't forget to forwardRef! diff --git a/src/view/com/util/WebAuxClickWrapper.tsx b/src/view/com/util/WebAuxClickWrapper.tsx index 8105a8518..6ea9b3bec 100644 --- a/src/view/com/util/WebAuxClickWrapper.tsx +++ b/src/view/com/util/WebAuxClickWrapper.tsx @@ -1,5 +1,5 @@ -import React from 'react' import {Platform} from 'react-native' +import type React from 'react' const onMouseUp = (e: React.MouseEvent & {target: HTMLElement}) => { // Only handle whenever it is the middle button diff --git a/src/view/com/util/error/ErrorMessage.tsx b/src/view/com/util/error/ErrorMessage.tsx index 50e55e70c..529406996 100644 --- a/src/view/com/util/error/ErrorMessage.tsx +++ b/src/view/com/util/error/ErrorMessage.tsx @@ -1,13 +1,13 @@ import { - StyleProp, + type StyleProp, StyleSheet, TouchableOpacity, 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' diff --git a/src/view/com/util/error/ErrorScreen.tsx b/src/view/com/util/error/ErrorScreen.tsx index e9b0e50a3..26342ec75 100644 --- a/src/view/com/util/error/ErrorScreen.tsx +++ b/src/view/com/util/error/ErrorScreen.tsx @@ -1,7 +1,7 @@ import {View} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/util/fab/FAB.web.tsx b/src/view/com/util/fab/FAB.web.tsx index b9f3a0b07..976c19e7d 100644 --- a/src/view/com/util/fab/FAB.web.tsx +++ b/src/view/com/util/fab/FAB.web.tsx @@ -1,7 +1,7 @@ import {View} from 'react-native' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' -import {FABInner, FABProps} from './FABInner' +import {FABInner, type FABProps} from './FABInner' export const FAB = (_opts: FABProps) => { const {isDesktop} = useWebMediaQueries() diff --git a/src/view/com/util/images/Image.tsx b/src/view/com/util/images/Image.tsx index 94563ef9c..ece0fbb04 100644 --- a/src/view/com/util/images/Image.tsx +++ b/src/view/com/util/images/Image.tsx @@ -1,4 +1,4 @@ -import {Image, ImageProps, ImageSource} from 'expo-image' +import {Image, type ImageProps, type ImageSource} from 'expo-image' interface HighPriorityImageProps extends ImageProps { source: ImageSource diff --git a/src/view/com/util/layouts/LoggedOutLayout.tsx b/src/view/com/util/layouts/LoggedOutLayout.tsx index aadabd8cb..2ec17799f 100644 --- a/src/view/com/util/layouts/LoggedOutLayout.tsx +++ b/src/view/com/util/layouts/LoggedOutLayout.tsx @@ -1,5 +1,5 @@ -import React from 'react' import {ScrollView, StyleSheet, View} from 'react-native' +import type React from 'react' import {useColorSchemeStyle} from '#/lib/hooks/useColorSchemeStyle' import {useIsKeyboardVisible} from '#/lib/hooks/useIsKeyboardVisible' diff --git a/src/view/icons/Logo.tsx b/src/view/icons/Logo.tsx index 4de7c1613..465018cfb 100644 --- a/src/view/icons/Logo.tsx +++ b/src/view/icons/Logo.tsx @@ -1,12 +1,12 @@ import React from 'react' -import {StyleSheet, TextProps} from 'react-native' +import {StyleSheet, type TextProps} from 'react-native' import Svg, { Defs, LinearGradient, Path, - PathProps, + type PathProps, Stop, - SvgProps, + type SvgProps, } from 'react-native-svg' import {Image} from 'expo-image' diff --git a/src/view/icons/Logomark.tsx b/src/view/icons/Logomark.tsx index b777992d4..8d078f434 100644 --- a/src/view/icons/Logomark.tsx +++ b/src/view/icons/Logomark.tsx @@ -1,4 +1,4 @@ -import Svg, {Path, PathProps, SvgProps} from 'react-native-svg' +import Svg, {Path, type PathProps, type SvgProps} from 'react-native-svg' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/icons/Logotype.tsx b/src/view/icons/Logotype.tsx index 8be4980e6..270c913fc 100644 --- a/src/view/icons/Logotype.tsx +++ b/src/view/icons/Logotype.tsx @@ -1,4 +1,4 @@ -import Svg, {Path, PathProps, SvgProps} from 'react-native-svg' +import Svg, {Path, type PathProps, type SvgProps} from 'react-native-svg' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/screens/CommunityGuidelines.tsx b/src/view/screens/CommunityGuidelines.tsx index 76993d5b7..42bf8c1a1 100644 --- a/src/view/screens/CommunityGuidelines.tsx +++ b/src/view/screens/CommunityGuidelines.tsx @@ -5,7 +5,10 @@ import {useLingui} from '@lingui/react' import {useFocusEffect} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {s} from '#/lib/styles' import {useSetMinimalShellMode} from '#/state/shell' import {TextLink} from '#/view/com/util/Link' diff --git a/src/view/screens/CopyrightPolicy.tsx b/src/view/screens/CopyrightPolicy.tsx index fe2731c53..45311e729 100644 --- a/src/view/screens/CopyrightPolicy.tsx +++ b/src/view/screens/CopyrightPolicy.tsx @@ -5,7 +5,10 @@ import {useLingui} from '@lingui/react' import {useFocusEffect} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {s} from '#/lib/styles' import {useSetMinimalShellMode} from '#/state/shell' import {TextLink} from '#/view/com/util/Link' diff --git a/src/view/screens/NotFound.tsx b/src/view/screens/NotFound.tsx index 90d5e17dd..a9d5e045d 100644 --- a/src/view/screens/NotFound.tsx +++ b/src/view/screens/NotFound.tsx @@ -9,7 +9,7 @@ import { } from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {s} from '#/lib/styles' import {useSetMinimalShellMode} from '#/state/shell' import {Button} from '#/view/com/util/forms/Button' diff --git a/src/view/screens/PrivacyPolicy.tsx b/src/view/screens/PrivacyPolicy.tsx index 57e4652b5..a89eaadc4 100644 --- a/src/view/screens/PrivacyPolicy.tsx +++ b/src/view/screens/PrivacyPolicy.tsx @@ -5,7 +5,10 @@ import {useLingui} from '@lingui/react' import {useFocusEffect} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {s} from '#/lib/styles' import {useSetMinimalShellMode} from '#/state/shell' import {TextLink} from '#/view/com/util/Link' diff --git a/src/view/screens/ProfileFeedLikedBy.tsx b/src/view/screens/ProfileFeedLikedBy.tsx index e19b42240..0a2ffc097 100644 --- a/src/view/screens/ProfileFeedLikedBy.tsx +++ b/src/view/screens/ProfileFeedLikedBy.tsx @@ -3,7 +3,10 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useFocusEffect} from '@react-navigation/native' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {makeRecordUri} from '#/lib/strings/url-helpers' import {useSetMinimalShellMode} from '#/state/shell' import {PostLikedBy as PostLikedByComponent} from '#/view/com/post-thread/PostLikedBy' diff --git a/src/view/screens/Storybook/ListContained.tsx b/src/view/screens/Storybook/ListContained.tsx index e673743eb..3804c1a6b 100644 --- a/src/view/screens/Storybook/ListContained.tsx +++ b/src/view/screens/Storybook/ListContained.tsx @@ -2,7 +2,7 @@ import React from 'react' import {View} from 'react-native' import {ScrollProvider} from '#/lib/ScrollContext' -import {List, ListMethods} from '#/view/com/util/List' +import {List, type ListMethods} from '#/view/com/util/List' import {Button, ButtonText} from '#/components/Button' import * as Toggle from '#/components/forms/Toggle' import {Text} from '#/components/Typography' diff --git a/src/view/screens/Support.tsx b/src/view/screens/Support.tsx index 8782e911b..a2d4a1121 100644 --- a/src/view/screens/Support.tsx +++ b/src/view/screens/Support.tsx @@ -5,7 +5,10 @@ import {useFocusEffect} from '@react-navigation/native' import {HELP_DESK_URL} from '#/lib/constants' import {usePalette} from '#/lib/hooks/usePalette' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {s} from '#/lib/styles' import {useSetMinimalShellMode} from '#/state/shell' import {TextLink} from '#/view/com/util/Link' diff --git a/src/view/screens/TermsOfService.tsx b/src/view/screens/TermsOfService.tsx index fa40fbca3..d843c713c 100644 --- a/src/view/screens/TermsOfService.tsx +++ b/src/view/screens/TermsOfService.tsx @@ -5,7 +5,10 @@ import {useLingui} from '@lingui/react' import {useFocusEffect} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' -import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' import {s} from '#/lib/styles' import {useSetMinimalShellMode} from '#/state/shell' import {TextLink} from '#/view/com/util/Link' -- 2.51.2 From 7574a745d17135b33a31e3fb7da8953ea378fe4c Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 9 Sep 2025 18:40:19 +0300 Subject: [PATCH 05/10] Fix focus ring shapes (#9005) * fix user avis being the wrong shape * fix the fab being the wrong shape --- src/view/com/util/UserAvatar.tsx | 20 +++++++++++++------- src/view/com/util/fab/FABInner.tsx | 15 +++++++++++---- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx index e83921b0b..aa5b22bd3 100644 --- a/src/view/com/util/UserAvatar.tsx +++ b/src/view/com/util/UserAvatar.tsx @@ -1,4 +1,4 @@ -import React, {memo, useCallback, useMemo, useState} from 'react' +import {memo, useCallback, useMemo, useState} from 'react' import { Image, Pressable, @@ -363,7 +363,7 @@ let EditableUserAvatar = ({ } }, [circular, size]) - const onOpenCamera = React.useCallback(async () => { + const onOpenCamera = useCallback(async () => { if (!(await requestCameraAccessIfNeeded())) { return } @@ -377,7 +377,7 @@ let EditableUserAvatar = ({ ) }, [onSelectNewAvatar, requestCameraAccessIfNeeded]) - const onOpenLibrary = React.useCallback(async () => { + const onOpenLibrary = useCallback(async () => { if (!(await requestPhotoAccessIfNeeded())) { return } @@ -421,7 +421,7 @@ let EditableUserAvatar = ({ circular, ]) - const onRemoveAvatar = React.useCallback(() => { + const onRemoveAvatar = useCallback(() => { onSelectNewAvatar(null) }, [onSelectNewAvatar]) @@ -528,7 +528,7 @@ let PreviewableUserAvatar = ({ disableNavigation, onBeforePress, live, - ...rest + ...props }: PreviewableUserAvatarProps): React.ReactNode => { const {_} = useLingui() const queryClient = useQueryClient() @@ -557,10 +557,15 @@ let PreviewableUserAvatar = ({ moderation={moderation} type={profile.associated?.labeler ? 'labeler' : 'user'} live={status.isActive || live} - {...rest} + {...props} /> ) + const linkStyle = + props.type !== 'algo' && props.type !== 'list' + ? a.rounded_full + : {borderRadius: props.size > 32 ? 8 : 3} + return ( {disableNavigation ? ( @@ -596,7 +601,8 @@ let PreviewableUserAvatar = ({ did: profile.did, handle: profile.handle, })} - onPress={onPress}> + onPress={onPress} + style={linkStyle}> {avatarEl} )} diff --git a/src/view/com/util/fab/FABInner.tsx b/src/view/com/util/fab/FABInner.tsx index c2d64411a..53dac103f 100644 --- a/src/view/com/util/fab/FABInner.tsx +++ b/src/view/com/util/fab/FABInner.tsx @@ -1,5 +1,10 @@ import {type ComponentProps, type JSX} from 'react' -import {StyleSheet, type TouchableWithoutFeedback} from 'react-native' +import { + type Pressable, + type StyleProp, + StyleSheet, + type ViewStyle, +} from 'react-native' import Animated from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {LinearGradient} from 'expo-linear-gradient' @@ -12,14 +17,15 @@ import {clamp} from '#/lib/numbers' import {gradients} from '#/lib/styles' import {isWeb} from '#/platform/detection' import {ios} from '#/alf' +import {atoms as a} from '#/alf' -export interface FABProps - extends ComponentProps { +export interface FABProps extends ComponentProps { testID?: string icon: JSX.Element + style?: StyleProp } -export function FABInner({testID, icon, onPress, ...props}: FABProps) { +export function FABInner({testID, icon, onPress, style, ...props}: FABProps) { const insets = useSafeAreaInsets() const {isMobile, isTablet} = useWebMediaQueries() const playHaptic = useHaptics() @@ -51,6 +57,7 @@ export function FABInner({testID, icon, onPress, ...props}: FABProps) { playHaptic('Heavy') })} targetScale={0.9} + style={[a.rounded_full, style]} {...props}> Date: Tue, 9 Sep 2025 18:45:36 +0300 Subject: [PATCH 06/10] Clean up dialogs (#8934) --- src/components/NewskieDialog.tsx | 210 +++++++++--------- src/components/StarterPack/QrCode.tsx | 20 +- src/components/StarterPack/QrCodeDialog.tsx | 113 +++++----- src/components/StarterPack/ShareDialog.tsx | 54 +++-- src/components/dialogs/EmbedConsent.tsx | 6 +- .../Settings/components/ExportCarDialog.tsx | 13 +- 6 files changed, 221 insertions(+), 195 deletions(-) diff --git a/src/components/NewskieDialog.tsx b/src/components/NewskieDialog.tsx index 0644ba704..30f70f549 100644 --- a/src/components/NewskieDialog.tsx +++ b/src/components/NewskieDialog.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import {useMemo, useState} from 'react' import {View} from 'react-native' import {type AppBskyActorDefs, moderateProfile} from '@atproto/api' import {msg, Trans} from '@lingui/macro' @@ -27,30 +27,12 @@ export function NewskieDialog({ disabled?: boolean }) { const {_} = useLingui() - const t = useTheme() - const moderationOpts = useModerationOpts() - const {currentAccount} = useSession() - const timeAgo = useGetTimeAgo() const control = useDialogControl() - const isMe = profile.did === currentAccount?.did const createdAt = profile.createdAt as string | undefined - const profileName = React.useMemo(() => { - const name = profile.displayName || profile.handle - - if (isMe) { - return _(msg`You`) - } - - if (!moderationOpts) return name - const moderation = moderateProfile(profile, moderationOpts) - - return sanitizeDisplayName(name, moderation.ui('displayName')) - }, [_, isMe, moderationOpts, profile]) - - const [now] = React.useState(() => Date.now()) - const daysOld = React.useMemo(() => { + const [now] = useState(() => Date.now()) + const daysOld = useMemo(() => { if (!createdAt) return Infinity return differenceInSeconds(now, new Date(createdAt)) / 86400 }, [createdAt, now]) @@ -77,88 +59,116 @@ export function NewskieDialog({ )} - + - - - - - - - - {isMe ? ( - Welcome, friend! - ) : ( - Say hello! - )} - - - - {profile.joinedViaStarterPack ? ( - - {profileName} joined Bluesky using a starter pack{' '} - {timeAgo(createdAt, now, {format: 'long'})} ago - - ) : ( - - {profileName} joined Bluesky{' '} - {timeAgo(createdAt, now, {format: 'long'})} ago - - )} - - {profile.joinedViaStarterPack ? ( - { - control.close() - }}> - - - - - ) : null} + + + + ) +} - {isNative && ( - - )} +function DialogInner({ + profile, + createdAt, + now, +}: { + profile: AppBskyActorDefs.ProfileViewDetailed + createdAt: string + now: number +}) { + const control = Dialog.useDialogContext() + const {_} = useLingui() + const t = useTheme() + const moderationOpts = useModerationOpts() + const {currentAccount} = useSession() + const timeAgo = useGetTimeAgo() + const isMe = profile.did === currentAccount?.did + + const profileName = useMemo(() => { + const name = profile.displayName || profile.handle + + if (isMe) { + return _(msg`You`) + } + + if (!moderationOpts) return name + const moderation = moderateProfile(profile, moderationOpts) + + return sanitizeDisplayName(name, moderation.ui('displayName')) + }, [_, isMe, moderationOpts, profile]) + + return ( + + + + + + + {isMe ? Welcome, friend! : Say hello!} + + + + {profile.joinedViaStarterPack ? ( + + {profileName} joined Bluesky using a starter pack{' '} + {timeAgo(createdAt, now, {format: 'long'})} ago + + ) : ( + + {profileName} joined Bluesky{' '} + {timeAgo(createdAt, now, {format: 'long'})} ago + + )} + + {profile.joinedViaStarterPack ? ( + control.close()}> + + + + + ) : null} - - - - + {isNative && ( + + )} + + + + ) } diff --git a/src/components/StarterPack/QrCode.tsx b/src/components/StarterPack/QrCode.tsx index 86f1aa1e6..4c28a41c5 100644 --- a/src/components/StarterPack/QrCode.tsx +++ b/src/components/StarterPack/QrCode.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import {lazy} from 'react' import {View} from 'react-native' // @ts-expect-error missing types import QRCode from 'react-native-qrcode-styled' @@ -15,20 +15,20 @@ import {LinearGradientBackground} from '#/components/LinearGradientBackground' import {Text} from '#/components/Typography' import * as bsky from '#/types/bsky' -const LazyViewShot = React.lazy( +const LazyViewShot = lazy( // @ts-expect-error dynamic import () => import('react-native-view-shot/src/index'), ) -interface Props { +export function QrCode({ + starterPack, + link, + ref, +}: { starterPack: AppBskyGraphDefs.StarterPackView link: string -} - -export const QrCode = React.forwardRef(function QrCode( - {starterPack, link}, - ref, -) { + ref: React.Ref +}) { const {record} = starterPack if ( @@ -93,7 +93,7 @@ export const QrCode = React.forwardRef(function QrCode( ) -}) +} export function QrCodeInner({link}: {link: string}) { const t = useTheme() diff --git a/src/components/StarterPack/QrCodeDialog.tsx b/src/components/StarterPack/QrCodeDialog.tsx index 6a66e92bd..4c40ccb10 100644 --- a/src/components/StarterPack/QrCodeDialog.tsx +++ b/src/components/StarterPack/QrCodeDialog.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import {Suspense, useRef, useState} from 'react' import {View} from 'react-native' import type ViewShot from 'react-native-view-shot' import {requestMediaLibraryPermissionsAsync} from 'expo-image-picker' @@ -8,16 +8,18 @@ import {type AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {logEvent} from '#/lib/statsig/statsig' import {logger} from '#/logger' import {isNative, isWeb} from '#/platform/detection' -import * as Toast from '#/view/com/util/Toast' -import {atoms as a} from '#/alf' -import {Button, ButtonText} from '#/components/Button' +import {atoms as a, useBreakpoints} from '#/alf' +import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' import {type DialogControlProps} from '#/components/Dialog' +import {ArrowOutOfBoxModified_Stroke2_Corner2_Rounded as ShareIcon} from '#/components/icons/ArrowOutOfBox' +import {ChainLink_Stroke2_Corner0_Rounded as ChainLinkIcon} from '#/components/icons/ChainLink' +import {FloppyDisk_Stroke2_Corner0_Rounded as FloppyDiskIcon} from '#/components/icons/FloppyDisk' import {Loader} from '#/components/Loader' import {QrCode} from '#/components/StarterPack/QrCode' +import * as Toast from '#/components/Toast' import * as bsky from '#/types/bsky' export function QrCodeDialog({ @@ -30,9 +32,11 @@ export function QrCodeDialog({ control: DialogControlProps }) { const {_} = useLingui() - const [isProcessing, setIsProcessing] = React.useState(false) + const {gtMobile} = useBreakpoints() + const [isSaveProcessing, setIsSaveProcessing] = useState(false) + const [isCopyProcessing, setIsCopyProcessing] = useState(false) - const ref = React.useRef(null) + const ref = useRef(null) const getCanvas = (base64: string): Promise => { return new Promise(resolve => { @@ -68,15 +72,14 @@ export function QrCodeDialog({ try { await createAssetAsync(`file://${uri}`) } catch (e: unknown) { - Toast.show( - _(msg`An error occurred while saving the QR code!`), - 'xmark', - ) + Toast.show(_(msg`An error occurred while saving the QR code!`), { + type: 'error', + }) logger.error('Failed to save QR code', {error: e}) return } } else { - setIsProcessing(true) + setIsSaveProcessing(true) if ( !bsky.validate( @@ -101,12 +104,12 @@ export function QrCodeDialog({ link.click() } - logEvent('starterPack:share', { + logger.metric('starterPack:share', { starterPack: starterPack.uri, shareType: 'qrcode', qrShareType: 'save', }) - setIsProcessing(false) + setIsSaveProcessing(false) Toast.show( isWeb ? _(msg`QR code has been downloaded!`) @@ -117,7 +120,7 @@ export function QrCodeDialog({ } const onCopyPress = async () => { - setIsProcessing(true) + setIsCopyProcessing(true) ref.current?.capture?.().then(async (uri: string) => { const canvas = await getCanvas(uri) // @ts-expect-error web only @@ -126,13 +129,13 @@ export function QrCodeDialog({ navigator.clipboard.write([item]) }) - logEvent('starterPack:share', { + logger.metric('starterPack:share', { starterPack: starterPack.uri, shareType: 'qrcode', qrShareType: 'copy', }) Toast.show(_(msg`QR code copied to your clipboard!`)) - setIsProcessing(false) + setIsCopyProcessing(false) control.close() }) } @@ -142,7 +145,7 @@ export function QrCodeDialog({ control.close(() => { Sharing.shareAsync(uri, {mimeType: 'image/png', UTI: 'image/png'}).then( () => { - logEvent('starterPack:share', { + logger.metric('starterPack:share', { starterPack: starterPack.uri, shareType: 'qrcode', qrShareType: 'share', @@ -154,49 +157,57 @@ export function QrCodeDialog({ } return ( - + - }> + }> {!link ? ( ) : ( <> - {isProcessing ? ( - - - - ) : ( - - - - - )} + + + + )} - + @@ -206,7 +217,7 @@ export function QrCodeDialog({ function Loading() { return ( - + ) diff --git a/src/components/StarterPack/ShareDialog.tsx b/src/components/StarterPack/ShareDialog.tsx index c159b42dd..32932fe2d 100644 --- a/src/components/StarterPack/ShareDialog.tsx +++ b/src/components/StarterPack/ShareDialog.tsx @@ -4,16 +4,18 @@ import {type AppBskyGraphDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import {useSaveImageToMediaLibrary} from '#/lib/media/save-image' import {shareUrl} from '#/lib/sharing' -import {logEvent} from '#/lib/statsig/statsig' import {getStarterPackOgCard} from '#/lib/strings/starter-pack' +import {logger} from '#/logger' import {isNative, isWeb} from '#/platform/detection' -import {atoms as a, useTheme} from '#/alf' -import {Button, ButtonText} from '#/components/Button' +import {atoms as a, useBreakpoints, useTheme} from '#/alf' +import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {type DialogControlProps} from '#/components/Dialog' import * as Dialog from '#/components/Dialog' +import {ChainLink_Stroke2_Corner0_Rounded as ChainLinkIcon} from '#/components/icons/ChainLink' +import {Download_Stroke2_Corner0_Rounded as DownloadIcon} from '#/components/icons/Download' +import {QrCode_Stroke2_Corner0_Rounded as QrCodeIcon} from '#/components/icons/QrCode' import {Loader} from '#/components/Loader' import {Text} from '#/components/Typography' @@ -27,7 +29,9 @@ interface Props { export function ShareDialog(props: Props) { return ( - + @@ -43,14 +47,14 @@ function ShareDialogInner({ }: Props) { const {_} = useLingui() const t = useTheme() - const {isTabletOrDesktop} = useWebMediaQueries() + const {gtMobile} = useBreakpoints() const imageUrl = getStarterPackOgCard(starterPack) const onShareLink = async () => { if (!link) return shareUrl(link) - logEvent('starterPack:share', { + logger.metric('starterPack:share', { starterPack: starterPack.uri, shareType: 'link', }) @@ -67,12 +71,12 @@ function ShareDialogInner({ <> {!imageLoaded || !link ? ( - + ) : ( - - + + Invite people to this starter pack! @@ -89,8 +93,8 @@ function ShareDialogInner({ a.rounded_sm, { aspectRatio: 1200 / 630, - transform: [{scale: isTabletOrDesktop ? 0.85 : 1}], - marginTop: isTabletOrDesktop ? -20 : 0, + transform: [{scale: gtMobile ? 0.85 : 1}], + marginTop: gtMobile ? -20 : 0, }, ]} accessibilityIgnoresInvertColors={true} @@ -98,30 +102,33 @@ function ShareDialogInner({ + + ) + } + return ( + + + + ) + }, [isOwner, _, onPressAddUser, gtMobile]) + + const renderEmptyState = useCallback(() => { + return ( + + + {isOwner && ( + + )} + + ) + }, [_, onPressAddUser, isOwner]) + + return ( + + + {isScrolledDown && ( + + )} + + ) +} diff --git a/src/screens/ProfileList/FeedSection.tsx b/src/screens/ProfileList/FeedSection.tsx new file mode 100644 index 000000000..96b1452e2 --- /dev/null +++ b/src/screens/ProfileList/FeedSection.tsx @@ -0,0 +1,111 @@ +import {useCallback, useEffect, useImperativeHandle, useState} from 'react' +import {View} from 'react-native' +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' +import {useIsFocused} from '@react-navigation/native' +import {useQueryClient} from '@tanstack/react-query' + +import {isNative} from '#/platform/detection' +import {listenSoftReset} from '#/state/events' +import {type FeedDescriptor} from '#/state/queries/post-feed' +import {RQKEY as FEED_RQKEY} from '#/state/queries/post-feed' +import {PostFeed} from '#/view/com/posts/PostFeed' +import {EmptyState} from '#/view/com/util/EmptyState' +import {type ListRef} from '#/view/com/util/List' +import {LoadLatestBtn} from '#/view/com/util/load-latest/LoadLatestBtn' +import {atoms as a} from '#/alf' +import {Button, ButtonIcon, ButtonText} from '#/components/Button' +import {PersonPlus_Stroke2_Corner0_Rounded as PersonPlusIcon} from '#/components/icons/Person' + +interface SectionRef { + scrollToTop: () => void +} + +interface FeedSectionProps { + ref?: React.Ref + feed: FeedDescriptor + headerHeight: number + scrollElRef: ListRef + isFocused: boolean + isOwner: boolean + onPressAddUser: () => void +} + +export function FeedSection({ + ref, + feed, + scrollElRef, + headerHeight, + isFocused, + isOwner, + onPressAddUser, +}: FeedSectionProps) { + const queryClient = useQueryClient() + const [hasNew, setHasNew] = useState(false) + const [isScrolledDown, setIsScrolledDown] = useState(false) + const isScreenFocused = useIsFocused() + const {_} = useLingui() + + const onScrollToTop = useCallback(() => { + scrollElRef.current?.scrollToOffset({ + animated: isNative, + offset: -headerHeight, + }) + queryClient.resetQueries({queryKey: FEED_RQKEY(feed)}) + setHasNew(false) + }, [scrollElRef, headerHeight, queryClient, feed, setHasNew]) + useImperativeHandle(ref, () => ({ + scrollToTop: onScrollToTop, + })) + + useEffect(() => { + if (!isScreenFocused) { + return + } + return listenSoftReset(onScrollToTop) + }, [onScrollToTop, isScreenFocused]) + + const renderPostsEmpty = useCallback(() => { + return ( + + + {isOwner && ( + + )} + + ) + }, [_, onPressAddUser, isOwner]) + + return ( + + + {(isScrolledDown || hasNew) && ( + + )} + + ) +} diff --git a/src/screens/ProfileList/components/ErrorScreen.tsx b/src/screens/ProfileList/components/ErrorScreen.tsx new file mode 100644 index 000000000..7ce343def --- /dev/null +++ b/src/screens/ProfileList/components/ErrorScreen.tsx @@ -0,0 +1,46 @@ +import {View} from 'react-native' +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' +import {useNavigation} from '@react-navigation/native' + +import {type NavigationProp} from '#/lib/routes/types' +import {atoms as a, useTheme} from '#/alf' +import {Button, ButtonText} from '#/components/Button' +import {Text} from '#/components/Typography' + +export function ErrorScreen({error}: {error: React.ReactNode}) { + const t = useTheme() + const navigation = useNavigation() + const {_} = useLingui() + const onPressBack = () => { + if (navigation.canGoBack()) { + navigation.goBack() + } else { + navigation.navigate('Home') + } + } + + return ( + + + Could not load list + + + {error} + + + + + + + ) +} diff --git a/src/screens/ProfileList/components/Header.tsx b/src/screens/ProfileList/components/Header.tsx new file mode 100644 index 000000000..fe4b33c75 --- /dev/null +++ b/src/screens/ProfileList/components/Header.tsx @@ -0,0 +1,208 @@ +import {useMemo} from 'react' +import {View} from 'react-native' +import {AppBskyGraphDefs, RichText as RichTextAPI} from '@atproto/api' +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' + +import {useHaptics} from '#/lib/haptics' +import {makeListLink} from '#/lib/routes/links' +import {logger} from '#/logger' +import {useListBlockMutation, useListMuteMutation} from '#/state/queries/list' +import { + useAddSavedFeedsMutation, + type UsePreferencesQueryResponse, + useUpdateSavedFeedsMutation, +} from '#/state/queries/preferences' +import {useSession} from '#/state/session' +import {ProfileSubpageHeader} from '#/view/com/profile/ProfileSubpageHeader' +import {atoms as a} from '#/alf' +import {Button, ButtonIcon, ButtonText} from '#/components/Button' +import {Pin_Stroke2_Corner0_Rounded as PinIcon} from '#/components/icons/Pin' +import {Loader} from '#/components/Loader' +import {RichText} from '#/components/RichText' +import * as Toast from '#/components/Toast' +import {MoreOptionsMenu} from './MoreOptionsMenu' +import {SubscribeMenu} from './SubscribeMenu' + +export function Header({ + rkey, + list, + preferences, +}: { + rkey: string + list: AppBskyGraphDefs.ListView + preferences: UsePreferencesQueryResponse +}) { + const {_} = useLingui() + const {currentAccount} = useSession() + const isCurateList = list.purpose === AppBskyGraphDefs.CURATELIST + const isModList = list.purpose === AppBskyGraphDefs.MODLIST + const isBlocking = !!list.viewer?.blocked + const isMuting = !!list.viewer?.muted + const playHaptic = useHaptics() + + const {mutateAsync: muteList, isPending: isMutePending} = + useListMuteMutation() + const {mutateAsync: blockList, isPending: isBlockPending} = + useListBlockMutation() + const {mutateAsync: addSavedFeeds, isPending: isAddSavedFeedPending} = + useAddSavedFeedsMutation() + const {mutateAsync: updateSavedFeeds, isPending: isUpdatingSavedFeeds} = + useUpdateSavedFeedsMutation() + + const isPending = isAddSavedFeedPending || isUpdatingSavedFeeds + + const savedFeedConfig = preferences?.savedFeeds?.find( + f => f.value === list.uri, + ) + const isPinned = Boolean(savedFeedConfig?.pinned) + + const onTogglePinned = async () => { + playHaptic() + + try { + if (savedFeedConfig) { + const pinned = !savedFeedConfig.pinned + await updateSavedFeeds([ + { + ...savedFeedConfig, + pinned, + }, + ]) + Toast.show( + pinned + ? _(msg`Pinned to your feeds`) + : _(msg`Unpinned from your feeds`), + ) + } else { + await addSavedFeeds([ + { + type: 'list', + value: list.uri, + pinned: true, + }, + ]) + Toast.show(_(msg`Saved to your feeds`)) + } + } catch (e) { + Toast.show(_(msg`There was an issue contacting the server`), { + type: 'error', + }) + logger.error('Failed to toggle pinned feed', {message: e}) + } + } + + const onUnsubscribeMute = async () => { + try { + await muteList({uri: list.uri, mute: false}) + Toast.show(_(msg({message: 'List unmuted', context: 'toast'}))) + logger.metric( + 'moderation:unsubscribedFromList', + {listType: 'mute'}, + {statsig: true}, + ) + } catch { + Toast.show( + _( + msg`There was an issue. Please check your internet connection and try again.`, + ), + ) + } + } + + const onUnsubscribeBlock = async () => { + try { + await blockList({uri: list.uri, block: false}) + Toast.show(_(msg({message: 'List unblocked', context: 'toast'}))) + logger.metric( + 'moderation:unsubscribedFromList', + {listType: 'block'}, + {statsig: true}, + ) + } catch { + Toast.show( + _( + msg`There was an issue. Please check your internet connection and try again.`, + ), + ) + } + } + + const descriptionRT = useMemo( + () => + list.description + ? new RichTextAPI({ + text: list.description, + facets: list.descriptionFacets, + }) + : undefined, + [list], + ) + + return ( + <> + + {isCurateList ? ( + + ) : isModList ? ( + isBlocking ? ( + + ) : isMuting ? ( + + ) : ( + + ) + ) : null} + + + {descriptionRT ? ( + + + + ) : null} + + ) +} diff --git a/src/screens/ProfileList/components/MoreOptionsMenu.tsx b/src/screens/ProfileList/components/MoreOptionsMenu.tsx new file mode 100644 index 000000000..17ca43a82 --- /dev/null +++ b/src/screens/ProfileList/components/MoreOptionsMenu.tsx @@ -0,0 +1,298 @@ +import {type AppBskyActorDefs, AppBskyGraphDefs, AtUri} from '@atproto/api' +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' +import {useNavigation} from '@react-navigation/native' + +import {type NavigationProp} from '#/lib/routes/types' +import {shareUrl} from '#/lib/sharing' +import {toShareUrl} from '#/lib/strings/url-helpers' +import {logger} from '#/logger' +import {isWeb} from '#/platform/detection' +import {useModalControls} from '#/state/modals' +import { + useListBlockMutation, + useListDeleteMutation, + useListMuteMutation, +} from '#/state/queries/list' +import {useRemoveFeedMutation} from '#/state/queries/preferences' +import {useSession} from '#/state/session' +import {Button, ButtonIcon} from '#/components/Button' +import {useDialogControl} from '#/components/Dialog' +import {ArrowOutOfBoxModified_Stroke2_Corner2_Rounded as ShareIcon} from '#/components/icons/ArrowOutOfBox' +import {ChainLink_Stroke2_Corner0_Rounded as ChainLink} from '#/components/icons/ChainLink' +import {DotGrid_Stroke2_Corner0_Rounded as DotGridIcon} from '#/components/icons/DotGrid' +import {PencilLine_Stroke2_Corner0_Rounded as PencilLineIcon} from '#/components/icons/Pencil' +import {PersonCheck_Stroke2_Corner0_Rounded as PersonCheckIcon} from '#/components/icons/Person' +import {Pin_Stroke2_Corner0_Rounded as PinIcon} from '#/components/icons/Pin' +import {SpeakerVolumeFull_Stroke2_Corner0_Rounded as UnmuteIcon} from '#/components/icons/Speaker' +import {Trash_Stroke2_Corner0_Rounded as TrashIcon} from '#/components/icons/Trash' +import {Warning_Stroke2_Corner0_Rounded as WarningIcon} from '#/components/icons/Warning' +import * as Menu from '#/components/Menu' +import { + ReportDialog, + useReportDialogControl, +} from '#/components/moderation/ReportDialog' +import * as Prompt from '#/components/Prompt' +import * as Toast from '#/components/Toast' + +export function MoreOptionsMenu({ + list, + savedFeedConfig, +}: { + list: AppBskyGraphDefs.ListView + savedFeedConfig?: AppBskyActorDefs.SavedFeed +}) { + const {_} = useLingui() + const {currentAccount} = useSession() + const {openModal} = useModalControls() + const deleteListPromptControl = useDialogControl() + const reportDialogControl = useReportDialogControl() + const navigation = useNavigation() + + const {mutateAsync: removeSavedFeed} = useRemoveFeedMutation() + const {mutateAsync: deleteList} = useListDeleteMutation() + const {mutateAsync: muteList} = useListMuteMutation() + const {mutateAsync: blockList} = useListBlockMutation() + + const isCurateList = list.purpose === AppBskyGraphDefs.CURATELIST + const isModList = list.purpose === AppBskyGraphDefs.MODLIST + const isBlocking = !!list.viewer?.blocked + const isMuting = !!list.viewer?.muted + const isPinned = Boolean(savedFeedConfig?.pinned) + const isOwner = currentAccount?.did === list.creator.did + + const onPressShare = () => { + const {rkey} = new AtUri(list.uri) + const url = toShareUrl(`/profile/${list.creator.did}/lists/${rkey}`) + shareUrl(url) + } + + const onRemoveFromSavedFeeds = async () => { + if (!savedFeedConfig) return + try { + await removeSavedFeed(savedFeedConfig) + Toast.show(_(msg`Removed from your feeds`)) + } catch (e) { + Toast.show(_(msg`There was an issue contacting the server`), { + type: 'error', + }) + logger.error('Failed to remove pinned list', {message: e}) + } + } + + const onPressEdit = () => { + openModal({ + name: 'create-or-edit-list', + list, + }) + } + + const onPressDelete = async () => { + await deleteList({uri: list.uri}) + + if (savedFeedConfig) { + await removeSavedFeed(savedFeedConfig) + } + + Toast.show(_(msg({message: 'List deleted', context: 'toast'}))) + if (navigation.canGoBack()) { + navigation.goBack() + } else { + navigation.navigate('Home') + } + } + + const onUnpinModList = async () => { + try { + if (!savedFeedConfig) return + await removeSavedFeed(savedFeedConfig) + Toast.show(_(msg`Unpinned list`)) + } catch { + Toast.show(_(msg`Failed to unpin list`), { + type: 'error', + }) + } + } + + const onUnsubscribeMute = async () => { + try { + await muteList({uri: list.uri, mute: false}) + Toast.show(_(msg({message: 'List unmuted', context: 'toast'}))) + logger.metric( + 'moderation:unsubscribedFromList', + {listType: 'mute'}, + {statsig: true}, + ) + } catch { + Toast.show( + _( + msg`There was an issue. Please check your internet connection and try again.`, + ), + ) + } + } + + const onUnsubscribeBlock = async () => { + try { + await blockList({uri: list.uri, block: false}) + Toast.show(_(msg({message: 'List unblocked', context: 'toast'}))) + logger.metric( + 'moderation:unsubscribedFromList', + {listType: 'block'}, + {statsig: true}, + ) + } catch { + Toast.show( + _( + msg`There was an issue. Please check your internet connection and try again.`, + ), + ) + } + } + + return ( + <> + + + {({props}) => ( + + )} + + + + + + {isWeb ? ( + Copy link to list + ) : ( + Share via... + )} + + + + {savedFeedConfig && ( + + + Remove from my feeds + + + + )} + + + + + {isOwner ? ( + + + + Edit list details + + + + + + Delete list + + + + + ) : ( + + + + Report list + + + + + )} + + {isModList && isPinned && ( + <> + + + + + Unpin moderation list + + + + + + )} + + {isCurateList && (isBlocking || isMuting) && ( + <> + + + {isBlocking && ( + + + Unblock list + + + + )} + {isMuting && ( + + + Unmute list + + + + )} + + + )} + + + + + + + + ) +} diff --git a/src/screens/ProfileList/components/SubscribeMenu.tsx b/src/screens/ProfileList/components/SubscribeMenu.tsx new file mode 100644 index 000000000..5b6b9ba09 --- /dev/null +++ b/src/screens/ProfileList/components/SubscribeMenu.tsx @@ -0,0 +1,130 @@ +import {type AppBskyGraphDefs} from '@atproto/api' +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' + +import {logger} from '#/logger' +import {useListBlockMutation, useListMuteMutation} from '#/state/queries/list' +import {atoms as a} from '#/alf' +import {Button, ButtonIcon, ButtonText} from '#/components/Button' +import {Mute_Stroke2_Corner0_Rounded as MuteIcon} from '#/components/icons/Mute' +import {PersonX_Stroke2_Corner0_Rounded as PersonXIcon} from '#/components/icons/Person' +import {Loader} from '#/components/Loader' +import * as Menu from '#/components/Menu' +import * as Prompt from '#/components/Prompt' +import * as Toast from '#/components/Toast' + +export function SubscribeMenu({list}: {list: AppBskyGraphDefs.ListView}) { + const {_} = useLingui() + const subscribeMutePromptControl = Prompt.usePromptControl() + const subscribeBlockPromptControl = Prompt.usePromptControl() + + const {mutateAsync: muteList, isPending: isMutePending} = + useListMuteMutation() + const {mutateAsync: blockList, isPending: isBlockPending} = + useListBlockMutation() + + const isPending = isMutePending || isBlockPending + + const onSubscribeMute = async () => { + try { + await muteList({uri: list.uri, mute: true}) + Toast.show(_(msg({message: 'List muted', context: 'toast'}))) + logger.metric( + 'moderation:subscribedToList', + {listType: 'mute'}, + {statsig: true}, + ) + } catch { + Toast.show( + _( + msg`There was an issue. Please check your internet connection and try again.`, + ), + {type: 'error'}, + ) + } + } + + const onSubscribeBlock = async () => { + try { + await blockList({uri: list.uri, block: true}) + Toast.show(_(msg({message: 'List blocked', context: 'toast'}))) + logger.metric( + 'moderation:subscribedToList', + {listType: 'block'}, + {statsig: true}, + ) + } catch { + Toast.show( + _( + msg`There was an issue. Please check your internet connection and try again.`, + ), + {type: 'error'}, + ) + } + } + + return ( + <> + + + {({props}) => ( + + )} + + + + + + Mute accounts + + + + + + Block accounts + + + + + + + + + + + + ) +} diff --git a/src/screens/ProfileList/index.tsx b/src/screens/ProfileList/index.tsx new file mode 100644 index 000000000..b3928c3d0 --- /dev/null +++ b/src/screens/ProfileList/index.tsx @@ -0,0 +1,296 @@ +import {useCallback, useMemo, useRef} from 'react' +import {View} from 'react-native' +import {useAnimatedRef} from 'react-native-reanimated' +import { + AppBskyGraphDefs, + AtUri, + moderateUserList, + type ModerationOpts, +} from '@atproto/api' +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' +import {useFocusEffect, useIsFocused} from '@react-navigation/native' +import {useQueryClient} from '@tanstack/react-query' + +import {useOpenComposer} from '#/lib/hooks/useOpenComposer' +import {useSetTitle} from '#/lib/hooks/useSetTitle' +import {ComposeIcon2} from '#/lib/icons' +import { + type CommonNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' +import {cleanError} from '#/lib/strings/errors' +import {useModerationOpts} from '#/state/preferences/moderation-opts' +import {useListQuery} from '#/state/queries/list' +import {RQKEY as FEED_RQKEY} from '#/state/queries/post-feed' +import { + usePreferencesQuery, + type UsePreferencesQueryResponse, +} from '#/state/queries/preferences' +import {useResolveUriQuery} from '#/state/queries/resolve-uri' +import {truncateAndInvalidate} from '#/state/queries/util' +import {useSession} from '#/state/session' +import {useSetMinimalShellMode} from '#/state/shell' +import {PagerWithHeader} from '#/view/com/pager/PagerWithHeader' +import {FAB} from '#/view/com/util/fab/FAB' +import {type ListRef} from '#/view/com/util/List' +import {ListHiddenScreen} from '#/screens/List/ListHiddenScreen' +import {atoms as a, platform} from '#/alf' +import {useDialogControl} from '#/components/Dialog' +import {ListAddRemoveUsersDialog} from '#/components/dialogs/lists/ListAddRemoveUsersDialog' +import * as Layout from '#/components/Layout' +import {Loader} from '#/components/Loader' +import * as Hider from '#/components/moderation/Hider' +import {AboutSection} from './AboutSection' +import {ErrorScreen} from './components/ErrorScreen' +import {Header} from './components/Header' +import {FeedSection} from './FeedSection' + +interface SectionRef { + scrollToTop: () => void +} + +type Props = NativeStackScreenProps +export function ProfileListScreen(props: Props) { + return ( + + + + ) +} + +function ProfileListScreenInner(props: Props) { + const {_} = useLingui() + const {name: handleOrDid, rkey} = props.route.params + const {data: resolvedUri, error: resolveError} = useResolveUriQuery( + AtUri.make(handleOrDid, 'app.bsky.graph.list', rkey).toString(), + ) + const {data: preferences} = usePreferencesQuery() + const {data: list, error: listError} = useListQuery(resolvedUri?.uri) + const moderationOpts = useModerationOpts() + + if (resolveError) { + return ( + <> + + + + + Could not load list + + + + + + + + + ) + } + if (listError) { + return ( + <> + + + + + Could not load list + + + + + + + + + ) + } + + return resolvedUri && list && moderationOpts && preferences ? ( + + ) : ( + <> + + + + + + + + + + ) +} + +function ProfileListScreenLoaded({ + route, + uri, + list, + moderationOpts, + preferences, +}: Props & { + uri: string + list: AppBskyGraphDefs.ListView + moderationOpts: ModerationOpts + preferences: UsePreferencesQueryResponse +}) { + const {_} = useLingui() + const queryClient = useQueryClient() + const {openComposer} = useOpenComposer() + const setMinimalShellMode = useSetMinimalShellMode() + const {currentAccount} = useSession() + const {rkey} = route.params + const feedSectionRef = useRef(null) + const aboutSectionRef = useRef(null) + const isCurateList = list.purpose === AppBskyGraphDefs.CURATELIST + const isScreenFocused = useIsFocused() + const isHidden = list.labels?.findIndex(l => l.val === '!hide') !== -1 + const isOwner = currentAccount?.did === list.creator.did + const scrollElRef = useAnimatedRef() + const addUserDialogControl = useDialogControl() + const sectionTitlesCurate = [_(msg`Posts`), _(msg`People`)] + + const moderation = useMemo(() => { + return moderateUserList(list, moderationOpts) + }, [list, moderationOpts]) + + useSetTitle(isHidden ? _(msg`List Hidden`) : list.name) + + useFocusEffect( + useCallback(() => { + setMinimalShellMode(false) + }, [setMinimalShellMode]), + ) + + const onChangeMembers = () => { + if (isCurateList) { + truncateAndInvalidate(queryClient, FEED_RQKEY(`list|${list.uri}`)) + } + } + + const onCurrentPageSelected = useCallback( + (index: number) => { + if (index === 0) { + feedSectionRef.current?.scrollToTop() + } else if (index === 1) { + aboutSectionRef.current?.scrollToTop() + } + }, + [feedSectionRef], + ) + + const renderHeader = useCallback(() => { + return
+ }, [rkey, list, preferences]) + + if (isCurateList) { + return ( + + + + + + + + {({headerHeight, scrollElRef, isFocused}) => ( + + )} + {({headerHeight, scrollElRef}) => ( + + )} + + openComposer({})} + icon={ + + } + accessibilityRole="button" + accessibilityLabel={_(msg`New post`)} + accessibilityHint="" + /> + + + + + ) + } + return ( + + + + + + + {renderHeader()} + + openComposer({})} + icon={ + + } + accessibilityRole="button" + accessibilityLabel={_(msg`New post`)} + accessibilityHint="" + /> + + + + + ) +} diff --git a/src/view/com/util/LoadingScreen.tsx b/src/view/com/util/LoadingScreen.tsx deleted file mode 100644 index 1086c9d17..000000000 --- a/src/view/com/util/LoadingScreen.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import {ActivityIndicator, View} from 'react-native' - -import {s} from '#/lib/styles' -import * as Layout from '#/components/Layout' - -/** - * @deprecated use Layout compoenents directly - */ -export function LoadingScreen() { - return ( - - - - - - ) -} diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx deleted file mode 100644 index 78cf5d11e..000000000 --- a/src/view/screens/ProfileList.tsx +++ /dev/null @@ -1,1061 +0,0 @@ -import React, {useCallback, useMemo} from 'react' -import {StyleSheet, View} from 'react-native' -import {useAnimatedRef} from 'react-native-reanimated' -import { - AppBskyGraphDefs, - AtUri, - moderateUserList, - type ModerationOpts, - RichText as RichTextAPI, -} from '@atproto/api' -import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' -import {msg, Trans} from '@lingui/macro' -import {useLingui} from '@lingui/react' -import {useFocusEffect, useIsFocused} from '@react-navigation/native' -import {useNavigation} from '@react-navigation/native' -import {useQueryClient} from '@tanstack/react-query' - -import {useHaptics} from '#/lib/haptics' -import {useOpenComposer} from '#/lib/hooks/useOpenComposer' -import {usePalette} from '#/lib/hooks/usePalette' -import {useSetTitle} from '#/lib/hooks/useSetTitle' -import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' -import {ComposeIcon2} from '#/lib/icons' -import {makeListLink} from '#/lib/routes/links' -import { - type CommonNavigatorParams, - type NativeStackScreenProps, -} from '#/lib/routes/types' -import {type NavigationProp} from '#/lib/routes/types' -import {shareUrl} from '#/lib/sharing' -import {cleanError} from '#/lib/strings/errors' -import {toShareUrl} from '#/lib/strings/url-helpers' -import {s} from '#/lib/styles' -import {logger} from '#/logger' -import {isNative, isWeb} from '#/platform/detection' -import {listenSoftReset} from '#/state/events' -import {useModalControls} from '#/state/modals' -import {useModerationOpts} from '#/state/preferences/moderation-opts' -import { - useListBlockMutation, - useListDeleteMutation, - useListMuteMutation, - useListQuery, -} from '#/state/queries/list' -import {type FeedDescriptor} from '#/state/queries/post-feed' -import {RQKEY as FEED_RQKEY} from '#/state/queries/post-feed' -import { - useAddSavedFeedsMutation, - usePreferencesQuery, - type UsePreferencesQueryResponse, - useRemoveFeedMutation, - useUpdateSavedFeedsMutation, -} from '#/state/queries/preferences' -import {useResolveUriQuery} from '#/state/queries/resolve-uri' -import {truncateAndInvalidate} from '#/state/queries/util' -import {useSession} from '#/state/session' -import {useSetMinimalShellMode} from '#/state/shell' -import {ListMembers} from '#/view/com/lists/ListMembers' -import {PagerWithHeader} from '#/view/com/pager/PagerWithHeader' -import {PostFeed} from '#/view/com/posts/PostFeed' -import {ProfileSubpageHeader} from '#/view/com/profile/ProfileSubpageHeader' -import {EmptyState} from '#/view/com/util/EmptyState' -import {FAB} from '#/view/com/util/fab/FAB' -import {Button} from '#/view/com/util/forms/Button' -import { - type DropdownItem, - NativeDropdown, -} from '#/view/com/util/forms/NativeDropdown' -import {type ListRef} from '#/view/com/util/List' -import {LoadLatestBtn} from '#/view/com/util/load-latest/LoadLatestBtn' -import {LoadingScreen} from '#/view/com/util/LoadingScreen' -import {Text} from '#/view/com/util/text/Text' -import * as Toast from '#/view/com/util/Toast' -import {ListHiddenScreen} from '#/screens/List/ListHiddenScreen' -import {atoms as a} from '#/alf' -import {Button as NewButton, ButtonIcon, ButtonText} from '#/components/Button' -import {useDialogControl} from '#/components/Dialog' -import {ListAddRemoveUsersDialog} from '#/components/dialogs/lists/ListAddRemoveUsersDialog' -import {PersonPlus_Stroke2_Corner0_Rounded as PersonPlusIcon} from '#/components/icons/Person' -import * as Layout from '#/components/Layout' -import * as Hider from '#/components/moderation/Hider' -import { - ReportDialog, - useReportDialogControl, -} from '#/components/moderation/ReportDialog' -import * as Prompt from '#/components/Prompt' -import {RichText} from '#/components/RichText' - -interface SectionRef { - scrollToTop: () => void -} - -type Props = NativeStackScreenProps -export function ProfileListScreen(props: Props) { - return ( - - - - ) -} - -function ProfileListScreenInner(props: Props) { - const {_} = useLingui() - const {name: handleOrDid, rkey} = props.route.params - const {data: resolvedUri, error: resolveError} = useResolveUriQuery( - AtUri.make(handleOrDid, 'app.bsky.graph.list', rkey).toString(), - ) - const {data: preferences} = usePreferencesQuery() - const {data: list, error: listError} = useListQuery(resolvedUri?.uri) - const moderationOpts = useModerationOpts() - - if (resolveError) { - return ( - - - - ) - } - if (listError) { - return ( - - - - ) - } - - return resolvedUri && list && moderationOpts && preferences ? ( - - ) : ( - - ) -} - -function ProfileListScreenLoaded({ - route, - uri, - list, - moderationOpts, - preferences, -}: Props & { - uri: string - list: AppBskyGraphDefs.ListView - moderationOpts: ModerationOpts - preferences: UsePreferencesQueryResponse -}) { - const {_} = useLingui() - const queryClient = useQueryClient() - const {openComposer} = useOpenComposer() - const setMinimalShellMode = useSetMinimalShellMode() - const {currentAccount} = useSession() - const {rkey} = route.params - const feedSectionRef = React.useRef(null) - const aboutSectionRef = React.useRef(null) - const isCurateList = list.purpose === AppBskyGraphDefs.CURATELIST - const isScreenFocused = useIsFocused() - const isHidden = list.labels?.findIndex(l => l.val === '!hide') !== -1 - const isOwner = currentAccount?.did === list.creator.did - const scrollElRef = useAnimatedRef() - const addUserDialogControl = useDialogControl() - const sectionTitlesCurate = [_(msg`Posts`), _(msg`People`)] - - const moderation = React.useMemo(() => { - return moderateUserList(list, moderationOpts) - }, [list, moderationOpts]) - - useSetTitle(isHidden ? _(msg`List Hidden`) : list.name) - - useFocusEffect( - useCallback(() => { - setMinimalShellMode(false) - }, [setMinimalShellMode]), - ) - - const onChangeMembers = useCallback(() => { - if (isCurateList) { - truncateAndInvalidate(queryClient, FEED_RQKEY(`list|${list.uri}`)) - } - }, [list.uri, isCurateList, queryClient]) - - const onCurrentPageSelected = React.useCallback( - (index: number) => { - if (index === 0) { - feedSectionRef.current?.scrollToTop() - } else if (index === 1) { - aboutSectionRef.current?.scrollToTop() - } - }, - [feedSectionRef], - ) - - const renderHeader = useCallback(() => { - return
- }, [rkey, list, preferences]) - - if (isCurateList) { - return ( - - - - - - - - {({headerHeight, scrollElRef, isFocused}) => ( - - )} - {({headerHeight, scrollElRef}) => ( - - )} - - openComposer({})} - icon={ - - } - accessibilityRole="button" - accessibilityLabel={_(msg`New post`)} - accessibilityHint="" - /> - - - - - ) - } - return ( - - - - - - - {renderHeader()} - - openComposer({})} - icon={ - - } - accessibilityRole="button" - accessibilityLabel={_(msg`New post`)} - accessibilityHint="" - /> - - - - - ) -} - -function Header({ - rkey, - list, - preferences, -}: { - rkey: string - list: AppBskyGraphDefs.ListView - preferences: UsePreferencesQueryResponse -}) { - const pal = usePalette('default') - const palInverted = usePalette('inverted') - const {_} = useLingui() - const navigation = useNavigation() - const {currentAccount} = useSession() - const reportDialogControl = useReportDialogControl() - const {openModal} = useModalControls() - const listMuteMutation = useListMuteMutation() - const listBlockMutation = useListBlockMutation() - const listDeleteMutation = useListDeleteMutation() - const isCurateList = list.purpose === 'app.bsky.graph.defs#curatelist' - const isModList = list.purpose === 'app.bsky.graph.defs#modlist' - const isBlocking = !!list.viewer?.blocked - const isMuting = !!list.viewer?.muted - const isOwner = list.creator.did === currentAccount?.did - const playHaptic = useHaptics() - - const {mutateAsync: addSavedFeeds, isPending: isAddSavedFeedPending} = - useAddSavedFeedsMutation() - const {mutateAsync: removeSavedFeed, isPending: isRemovePending} = - useRemoveFeedMutation() - const {mutateAsync: updateSavedFeeds, isPending: isUpdatingSavedFeeds} = - useUpdateSavedFeedsMutation() - - const isPending = - isAddSavedFeedPending || isRemovePending || isUpdatingSavedFeeds - - const deleteListPromptControl = useDialogControl() - const subscribeMutePromptControl = useDialogControl() - const subscribeBlockPromptControl = useDialogControl() - - const savedFeedConfig = preferences?.savedFeeds?.find( - f => f.value === list.uri, - ) - const isPinned = Boolean(savedFeedConfig?.pinned) - - const onTogglePinned = React.useCallback(async () => { - playHaptic() - - try { - if (savedFeedConfig) { - const pinned = !savedFeedConfig.pinned - await updateSavedFeeds([ - { - ...savedFeedConfig, - pinned, - }, - ]) - Toast.show( - pinned - ? _(msg`Pinned to your feeds`) - : _(msg`Unpinned from your feeds`), - ) - } else { - await addSavedFeeds([ - { - type: 'list', - value: list.uri, - pinned: true, - }, - ]) - Toast.show(_(msg`Saved to your feeds`)) - } - } catch (e) { - Toast.show(_(msg`There was an issue contacting the server`), 'xmark') - logger.error('Failed to toggle pinned feed', {message: e}) - } - }, [ - playHaptic, - addSavedFeeds, - updateSavedFeeds, - list.uri, - _, - savedFeedConfig, - ]) - - const onRemoveFromSavedFeeds = React.useCallback(async () => { - playHaptic() - if (!savedFeedConfig) return - try { - await removeSavedFeed(savedFeedConfig) - Toast.show(_(msg`Removed from your feeds`)) - } catch (e) { - Toast.show(_(msg`There was an issue contacting the server`), 'xmark') - logger.error('Failed to remove pinned list', {message: e}) - } - }, [playHaptic, removeSavedFeed, _, savedFeedConfig]) - - const onSubscribeMute = useCallback(async () => { - try { - await listMuteMutation.mutateAsync({uri: list.uri, mute: true}) - Toast.show(_(msg({message: 'List muted', context: 'toast'}))) - logger.metric( - 'moderation:subscribedToList', - {listType: 'mute'}, - {statsig: true}, - ) - } catch { - Toast.show( - _( - msg`There was an issue. Please check your internet connection and try again.`, - ), - ) - } - }, [list, listMuteMutation, _]) - - const onUnsubscribeMute = useCallback(async () => { - try { - await listMuteMutation.mutateAsync({uri: list.uri, mute: false}) - Toast.show(_(msg({message: 'List unmuted', context: 'toast'}))) - logger.metric( - 'moderation:unsubscribedFromList', - {listType: 'mute'}, - {statsig: true}, - ) - } catch { - Toast.show( - _( - msg`There was an issue. Please check your internet connection and try again.`, - ), - ) - } - }, [list, listMuteMutation, _]) - - const onSubscribeBlock = useCallback(async () => { - try { - await listBlockMutation.mutateAsync({uri: list.uri, block: true}) - Toast.show(_(msg({message: 'List blocked', context: 'toast'}))) - logger.metric( - 'moderation:subscribedToList', - {listType: 'block'}, - {statsig: true}, - ) - } catch { - Toast.show( - _( - msg`There was an issue. Please check your internet connection and try again.`, - ), - ) - } - }, [list, listBlockMutation, _]) - - const onUnsubscribeBlock = useCallback(async () => { - try { - await listBlockMutation.mutateAsync({uri: list.uri, block: false}) - Toast.show(_(msg({message: 'List unblocked', context: 'toast'}))) - logger.metric( - 'moderation:unsubscribedFromList', - {listType: 'block'}, - {statsig: true}, - ) - } catch { - Toast.show( - _( - msg`There was an issue. Please check your internet connection and try again.`, - ), - ) - } - }, [list, listBlockMutation, _]) - - const onPressEdit = useCallback(() => { - openModal({ - name: 'create-or-edit-list', - list, - }) - }, [openModal, list]) - - const onPressDelete = useCallback(async () => { - await listDeleteMutation.mutateAsync({uri: list.uri}) - - if (savedFeedConfig) { - await removeSavedFeed(savedFeedConfig) - } - - Toast.show(_(msg({message: 'List deleted', context: 'toast'}))) - if (navigation.canGoBack()) { - navigation.goBack() - } else { - navigation.navigate('Home') - } - }, [ - list, - listDeleteMutation, - navigation, - _, - removeSavedFeed, - savedFeedConfig, - ]) - - const onPressReport = useCallback(() => { - reportDialogControl.open() - }, [reportDialogControl]) - - const onPressShare = useCallback(() => { - const url = toShareUrl(`/profile/${list.creator.did}/lists/${rkey}`) - shareUrl(url) - }, [list, rkey]) - - const dropdownItems: DropdownItem[] = useMemo(() => { - let items: DropdownItem[] = [ - { - testID: 'listHeaderDropdownShareBtn', - label: isWeb ? _(msg`Copy link to list`) : _(msg`Share`), - onPress: onPressShare, - icon: { - ios: { - name: 'square.and.arrow.up', - }, - android: '', - web: 'share', - }, - }, - ] - - if (savedFeedConfig) { - items.push({ - testID: 'listHeaderDropdownRemoveFromFeedsBtn', - label: _(msg`Remove from my feeds`), - onPress: onRemoveFromSavedFeeds, - icon: { - ios: { - name: 'trash', - }, - android: '', - web: ['far', 'trash-can'], - }, - }) - } - - if (isOwner) { - items.push({label: 'separator'}) - items.push({ - testID: 'listHeaderDropdownEditBtn', - label: _(msg`Edit list details`), - onPress: onPressEdit, - icon: { - ios: { - name: 'pencil', - }, - android: '', - web: 'pen', - }, - }) - items.push({ - testID: 'listHeaderDropdownDeleteBtn', - label: _(msg`Delete list`), - onPress: deleteListPromptControl.open, - icon: { - ios: { - name: 'trash', - }, - android: '', - web: ['far', 'trash-can'], - }, - }) - } else { - items.push({label: 'separator'}) - items.push({ - testID: 'listHeaderDropdownReportBtn', - label: _(msg`Report list`), - onPress: onPressReport, - icon: { - ios: { - name: 'exclamationmark.triangle', - }, - android: '', - web: 'circle-exclamation', - }, - }) - } - if (isModList && isPinned) { - items.push({label: 'separator'}) - items.push({ - testID: 'listHeaderDropdownUnpinBtn', - label: _(msg`Unpin moderation list`), - onPress: - isPending || !savedFeedConfig - ? undefined - : () => removeSavedFeed(savedFeedConfig), - icon: { - ios: { - name: 'pin', - }, - android: '', - web: 'thumbtack', - }, - }) - } - if (isCurateList && (isBlocking || isMuting)) { - items.push({label: 'separator'}) - - if (isMuting) { - items.push({ - testID: 'listHeaderDropdownMuteBtn', - label: _(msg`Unmute list`), - onPress: onUnsubscribeMute, - icon: { - ios: { - name: 'eye', - }, - android: '', - web: 'eye', - }, - }) - } - - if (isBlocking) { - items.push({ - testID: 'listHeaderDropdownBlockBtn', - label: _(msg`Unblock list`), - onPress: onUnsubscribeBlock, - icon: { - ios: { - name: 'person.fill.xmark', - }, - android: '', - web: 'user-slash', - }, - }) - } - } - return items - }, [ - _, - onPressShare, - isOwner, - isModList, - isPinned, - isCurateList, - onPressEdit, - deleteListPromptControl.open, - onPressReport, - isPending, - isBlocking, - isMuting, - onUnsubscribeMute, - onUnsubscribeBlock, - removeSavedFeed, - savedFeedConfig, - onRemoveFromSavedFeeds, - ]) - - const subscribeDropdownItems: DropdownItem[] = useMemo(() => { - return [ - { - testID: 'subscribeDropdownMuteBtn', - label: _(msg`Mute accounts`), - onPress: subscribeMutePromptControl.open, - icon: { - ios: { - name: 'speaker.slash', - }, - android: '', - web: 'user-slash', - }, - }, - { - testID: 'subscribeDropdownBlockBtn', - label: _(msg`Block accounts`), - onPress: subscribeBlockPromptControl.open, - icon: { - ios: { - name: 'person.fill.xmark', - }, - android: '', - web: 'ban', - }, - }, - ] - }, [_, subscribeMutePromptControl.open, subscribeBlockPromptControl.open]) - - const descriptionRT = useMemo( - () => - list.description - ? new RichTextAPI({ - text: list.description, - facets: list.descriptionFacets, - }) - : undefined, - [list], - ) - - return ( - <> - - - {isCurateList ? ( - - - - ) -} - -const styles = StyleSheet.create({ - btn: { - flexDirection: 'row', - alignItems: 'center', - gap: 6, - paddingVertical: 7, - paddingHorizontal: 14, - borderRadius: 50, - marginLeft: 6, - }, -}) -- 2.51.2 From 9e8bceec60f065bd52ea2e6c24b22ab42553d04d Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 9 Sep 2025 20:27:16 +0300 Subject: [PATCH 08/10] reduce checkmark size in thread anchor (#8942) --- src/components/verification/VerificationCheckButton.tsx | 2 +- src/screens/PostThread/components/ThreadItemAnchor.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/verification/VerificationCheckButton.tsx b/src/components/verification/VerificationCheckButton.tsx index 2ccc730f6..3f3bb2095 100644 --- a/src/components/verification/VerificationCheckButton.tsx +++ b/src/components/verification/VerificationCheckButton.tsx @@ -85,7 +85,7 @@ export function Badge({ if (size === 'lg') { dimensions = gtPhone ? 20 : 18 } else if (size === 'md') { - dimensions = 16 + dimensions = 14 } const verifiedByHidden = !state.profile.showBadge && state.profile.isViewer diff --git a/src/screens/PostThread/components/ThreadItemAnchor.tsx b/src/screens/PostThread/components/ThreadItemAnchor.tsx index 0eb7c2e25..51bf41a76 100644 --- a/src/screens/PostThread/components/ThreadItemAnchor.tsx +++ b/src/screens/PostThread/components/ThreadItemAnchor.tsx @@ -354,7 +354,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({ )} - + -- 2.51.2 From 372e20efa36c52a04cf2aa48816b82a1d96e0711 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 9 Sep 2025 22:40:25 +0300 Subject: [PATCH 09/10] ALF saved feeds screen (#8844) --- src/Navigation.tsx | 2 +- src/screens/Feeds/NoFollowingFeed.tsx | 34 +-- src/screens/Feeds/NoSavedFeedsOfAnyType.tsx | 17 +- src/{view => }/screens/SavedFeeds.tsx | 321 +++++++++----------- 4 files changed, 170 insertions(+), 204 deletions(-) rename src/{view => }/screens/SavedFeeds.tsx (56%) diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 45f078625..fa33a9d56 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -64,7 +64,6 @@ import {PostThreadScreen} from '#/view/screens/PostThread' import {PrivacyPolicyScreen} from '#/view/screens/PrivacyPolicy' import {ProfileScreen} from '#/view/screens/Profile' import {ProfileFeedLikedByScreen} from '#/view/screens/ProfileFeedLikedBy' -import {SavedFeeds} from '#/view/screens/SavedFeeds' import {Storybook} from '#/view/screens/Storybook' import {SupportScreen} from '#/view/screens/Support' import {TermsOfServiceScreen} from '#/view/screens/TermsOfService' @@ -92,6 +91,7 @@ import {ProfileFollowsScreen} from '#/screens/Profile/ProfileFollows' import {ProfileLabelerLikedByScreen} from '#/screens/Profile/ProfileLabelerLikedBy' import {ProfileSearchScreen} from '#/screens/Profile/ProfileSearch' import {ProfileListScreen} from '#/screens/ProfileList' +import {SavedFeeds} from '#/screens/SavedFeeds' import {SearchScreen} from '#/screens/Search' import {AboutSettingsScreen} from '#/screens/Settings/AboutSettings' import {AccessibilitySettingsScreen} from '#/screens/Settings/AccessibilitySettings' diff --git a/src/screens/Feeds/NoFollowingFeed.tsx b/src/screens/Feeds/NoFollowingFeed.tsx index fa48cca72..60205b856 100644 --- a/src/screens/Feeds/NoFollowingFeed.tsx +++ b/src/screens/Feeds/NoFollowingFeed.tsx @@ -1,5 +1,4 @@ -import React from 'react' -import {View} from 'react-native' +import {type GestureResponderEvent, View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -9,27 +8,26 @@ import {atoms as a, useTheme} from '#/alf' import {InlineLinkText} from '#/components/Link' import {Text} from '#/components/Typography' -export function NoFollowingFeed() { +export function NoFollowingFeed({onAddFeed}: {onAddFeed?: () => void}) { const t = useTheme() const {_} = useLingui() const {mutateAsync: addSavedFeeds} = useAddSavedFeedsMutation() - const addRecommendedFeeds = React.useCallback( - (e: any) => { - e.preventDefault() + const addRecommendedFeeds = (e: GestureResponderEvent) => { + e.preventDefault() - addSavedFeeds([ - { - ...TIMELINE_SAVED_FEED, - pinned: true, - }, - ]) + addSavedFeeds([ + { + ...TIMELINE_SAVED_FEED, + pinned: true, + }, + ]) - // prevent navigation - return false - }, - [addSavedFeeds], - ) + onAddFeed?.() + + // prevent navigation + return false as const + } return ( @@ -37,7 +35,7 @@ export function NoFollowingFeed() { Looks like you're missing a following feed.{' '} diff --git a/src/screens/Feeds/NoSavedFeedsOfAnyType.tsx b/src/screens/Feeds/NoSavedFeedsOfAnyType.tsx index 8f6bd9d2e..db0ed1a7d 100644 --- a/src/screens/Feeds/NoSavedFeedsOfAnyType.tsx +++ b/src/screens/Feeds/NoSavedFeedsOfAnyType.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {TID} from '@atproto/common-web' import {msg, Trans} from '@lingui/macro' @@ -16,20 +15,25 @@ import {Text} from '#/components/Typography' * feeds if pressed. It should only be presented to the user if they actually * have no other feeds saved. */ -export function NoSavedFeedsOfAnyType() { +export function NoSavedFeedsOfAnyType({ + onAddRecommendedFeeds, +}: { + onAddRecommendedFeeds?: () => void +}) { const t = useTheme() const {_} = useLingui() const {isPending, mutateAsync: overwriteSavedFeeds} = useOverwriteSavedFeedsMutation() - const addRecommendedFeeds = React.useCallback(async () => { + const addRecommendedFeeds = async () => { + onAddRecommendedFeeds?.() await overwriteSavedFeeds( RECOMMENDED_SAVED_FEEDS.map(f => ({ ...f, id: TID.nextStr(), })), ) - }, [overwriteSavedFeeds]) + } return ( - + {_(msg`Use recommended`)} diff --git a/src/view/screens/SavedFeeds.tsx b/src/screens/SavedFeeds.tsx similarity index 56% rename from src/view/screens/SavedFeeds.tsx rename to src/screens/SavedFeeds.tsx index 0e85bdf73..1baceb4f4 100644 --- a/src/view/screens/SavedFeeds.tsx +++ b/src/screens/SavedFeeds.tsx @@ -1,22 +1,20 @@ -import React from 'react' -import {ActivityIndicator, Pressable, StyleSheet, View} from 'react-native' +import {useCallback, useState} from 'react' +import {View} from 'react-native' import Animated, {LinearTransition} from 'react-native-reanimated' import {type AppBskyActorDefs} from '@atproto/api' -import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {TID} from '@atproto/common-web' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useFocusEffect} from '@react-navigation/native' import {useNavigation} from '@react-navigation/native' import {type NativeStackScreenProps} from '@react-navigation/native-stack' +import {RECOMMENDED_SAVED_FEEDS, TIMELINE_SAVED_FEED} from '#/lib/constants' import {useHaptics} from '#/lib/haptics' -import {usePalette} from '#/lib/hooks/usePalette' -import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import { type CommonNavigatorParams, type NavigationProp, } from '#/lib/routes/types' -import {colors, s} from '#/lib/styles' import {logger} from '#/logger' import { useOverwriteSavedFeedsMutation, @@ -25,18 +23,24 @@ import { import {type UsePreferencesQueryResponse} from '#/state/queries/preferences/types' import {useSetMinimalShellMode} from '#/state/shell' import {FeedSourceCard} from '#/view/com/feeds/FeedSourceCard' -import {TextLink} from '#/view/com/util/Link' -import {Text} from '#/view/com/util/text/Text' import * as Toast from '#/view/com/util/Toast' import {NoFollowingFeed} from '#/screens/Feeds/NoFollowingFeed' import {NoSavedFeedsOfAnyType} from '#/screens/Feeds/NoSavedFeedsOfAnyType' -import {atoms as a, useTheme} from '#/alf' +import {atoms as a, useBreakpoints, useTheme} from '#/alf' +import {Admonition} from '#/components/Admonition' import {Button, ButtonIcon, ButtonText} from '#/components/Button' +import { + ArrowBottom_Stroke2_Corner0_Rounded as ArrowDownIcon, + ArrowTop_Stroke2_Corner0_Rounded as ArrowUpIcon, +} from '#/components/icons/Arrow' import {FilterTimeline_Stroke2_Corner0_Rounded as FilterTimeline} from '#/components/icons/FilterTimeline' import {FloppyDisk_Stroke2_Corner0_Rounded as SaveIcon} from '#/components/icons/FloppyDisk' +import {Pin_Filled_Corner0_Rounded as PinIcon} from '#/components/icons/Pin' +import {Trash_Stroke2_Corner0_Rounded as TrashIcon} from '#/components/icons/Trash' import * as Layout from '#/components/Layout' +import {InlineLinkText} from '#/components/Link' import {Loader} from '#/components/Loader' -import {Text as NewText} from '#/components/Typography' +import {Text} from '#/components/Typography' type Props = NativeStackScreenProps export function SavedFeeds({}: Props) { @@ -52,9 +56,9 @@ function SavedFeedsInner({ }: { preferences: UsePreferencesQueryResponse }) { - const pal = usePalette('default') + const t = useTheme() const {_} = useLingui() - const {isMobile, isDesktop} = useWebMediaQueries() + const {gtMobile} = useBreakpoints() const setMinimalShellMode = useSetMinimalShellMode() const {mutateAsync: overwriteSavedFeeds, isPending: isOverwritePending} = useOverwriteSavedFeedsMutation() @@ -64,7 +68,7 @@ function SavedFeedsInner({ * Use optimistic data if exists and no error, otherwise fallback to remote * data */ - const [currentFeeds, setCurrentFeeds] = React.useState( + const [currentFeeds, setCurrentFeeds] = useState( () => preferences.savedFeeds || [], ) const hasUnsavedChanges = currentFeeds !== preferences.savedFeeds @@ -75,12 +79,12 @@ function SavedFeedsInner({ currentFeeds.every(f => f.type !== 'timeline') && !noSavedFeedsOfAnyType useFocusEffect( - React.useCallback(() => { + useCallback(() => { setMinimalShellMode(false) }, [setMinimalShellMode]), ) - const onSaveChanges = React.useCallback(async () => { + const onSaveChanges = async () => { try { await overwriteSavedFeeds(currentFeeds) Toast.show(_(msg({message: 'Feeds updated!', context: 'toast'}))) @@ -93,7 +97,7 @@ function SavedFeedsInner({ Toast.show(_(msg`There was an issue contacting the server`), 'xmark') logger.error('Failed to toggle pinned feed', {message: e}) } - }, [_, overwriteSavedFeeds, currentFeeds, navigation]) + } return ( @@ -107,43 +111,43 @@ function SavedFeedsInner({ {noSavedFeedsOfAnyType && ( - - + + + setCurrentFeeds( + RECOMMENDED_SAVED_FEEDS.map(f => ({ + ...f, + id: TID.nextStr(), + })), + ) + } + /> )} - - - Pinned Feeds - - + + Pinned Feeds + {preferences ? ( !pinnedFeeds.length ? ( - - + + You don't have any pinned feeds. - + ) : ( pinnedFeeds.map(f => ( @@ -158,32 +162,34 @@ function SavedFeedsInner({ )) ) ) : ( - + + + )} {noFollowingFeed && ( - - + + + setCurrentFeeds(feeds => [ + ...feeds, + {...TIMELINE_SAVED_FEED, id: TID.next().toString()}, + ]) + } + /> )} - - - Saved Feeds - - + + Saved Feeds + + {preferences ? ( !unpinnedFeeds.length ? ( - - + + You don't have any saved feeds. - + ) : ( unpinnedFeeds.map(f => ( @@ -198,20 +204,24 @@ function SavedFeedsInner({ )) ) ) : ( - + + + )} - - + + Feeds are custom algorithms that users build with a little coding expertise.{' '} - {' '} + + See this guide + {' '} for more information. @@ -234,20 +244,20 @@ function ListItem({ preferences: UsePreferencesQueryResponse }) { const {_} = useLingui() - const pal = usePalette('default') + const t = useTheme() const playHaptic = useHaptics() const feedUri = feed.value - const onTogglePinned = React.useCallback(async () => { + const onTogglePinned = async () => { playHaptic() setCurrentFeeds( currentFeeds.map(f => f.id === feed.id ? {...feed, pinned: !feed.pinned} : f, ), ) - }, [playHaptic, feed, currentFeeds, setCurrentFeeds]) + } - const onPressUp = React.useCallback(async () => { + const onPressUp = async () => { if (!isPinned) return const nextFeeds = currentFeeds.slice() @@ -262,9 +272,9 @@ function ListItem({ ] setCurrentFeeds(nextFeeds) - }, [feed, isPinned, setCurrentFeeds, currentFeeds]) + } - const onPressDown = React.useCallback(async () => { + const onPressDown = async () => { if (!isPinned) return const nextFeeds = currentFeeds.slice() @@ -280,16 +290,16 @@ function ListItem({ ] setCurrentFeeds(nextFeeds) - }, [feed, isPinned, setCurrentFeeds, currentFeeds]) + } - const onPressRemove = React.useCallback(async () => { + const onPressRemove = async () => { playHaptic() setCurrentFeeds(currentFeeds.filter(f => f.id !== feed.id)) - }, [playHaptic, feed, currentFeeds, setCurrentFeeds]) + } return ( {feed.type === 'timeline' ? ( @@ -302,93 +312,73 @@ function ListItem({ hideTopBorder={true} /> )} - {isPinned ? ( - <> - ({ - backgroundColor: pal.viewLight.backgroundColor, - paddingHorizontal: 12, - paddingVertical: 10, - borderRadius: 4, - marginRight: 8, - opacity: state.hovered || state.pressed ? 0.5 : 1, - })} - testID={`feed-${feed.type}-moveUp`}> - - - ({ - backgroundColor: pal.viewLight.backgroundColor, - paddingHorizontal: 12, - paddingVertical: 10, - borderRadius: 4, - marginRight: 8, - opacity: state.hovered || state.pressed ? 0.5 : 1, - })} - testID={`feed-${feed.type}-moveDown`}> - - - - ) : ( - ({ - marginRight: 8, - paddingHorizontal: 12, - paddingVertical: 10, - borderRadius: 4, - opacity: state.hovered || state.focused ? 0.5 : 1, - })}> - - - )} - - + {isPinned ? ( + <> + + + + ) : ( + + )} + ) } +function SectionHeaderText({children}: {children: React.ReactNode}) { + const t = useTheme() + // eslint-disable-next-line bsky-internal/avoid-unwrapped-text + return ( + + {children} + + ) +} + function FollowingFeedCard() { const t = useTheme() return ( @@ -416,35 +406,10 @@ function FollowingFeedCard() { /> - + Following - + ) } - -const styles = StyleSheet.create({ - empty: { - paddingHorizontal: 20, - paddingVertical: 20, - borderRadius: 8, - marginHorizontal: 10, - marginTop: 10, - }, - title: { - paddingHorizontal: 14, - paddingTop: 20, - paddingBottom: 10, - borderBottomWidth: StyleSheet.hairlineWidth, - }, - itemContainer: { - flexDirection: 'row', - alignItems: 'center', - borderBottomWidth: StyleSheet.hairlineWidth, - }, - footerText: { - paddingHorizontal: 26, - paddingVertical: 22, - }, -}) -- 2.51.2 From c7591ef058be0456f9fe122b686aa1c1f1c6e966 Mon Sep 17 00:00:00 2001 From: pfrazee <1270099+pfrazee@users.noreply.github.com> Date: Wed, 10 Sep 2025 02:33:45 +0000 Subject: [PATCH 10/10] Nightly source-language update --- src/locale/locales/en/messages.po | 531 ++++++++++++++++-------------- 1 file changed, 285 insertions(+), 246 deletions(-) diff --git a/src/locale/locales/en/messages.po b/src/locale/locales/en/messages.po index 5aa60eaa3..0a7a332b1 100644 --- a/src/locale/locales/en/messages.po +++ b/src/locale/locales/en/messages.po @@ -30,11 +30,11 @@ msgstr "" msgid "{0, plural, one {# day} other {# days}}" msgstr "" -#: src/screens/Profile/ProfileFollowers.tsx:40 +#: src/screens/Profile/ProfileFollowers.tsx:43 msgid "{0, plural, one {# follower} other {# followers}}" msgstr "" -#: src/screens/Profile/ProfileFollows.tsx:40 +#: src/screens/Profile/ProfileFollows.tsx:43 msgid "{0, plural, one {# following} other {# following}}" msgstr "" @@ -42,15 +42,15 @@ msgstr "" msgid "{0, plural, one {# hour} other {# hours}}" msgstr "" -#: src/components/moderation/LabelsOnMe.tsx:53 +#: src/components/moderation/LabelsOnMe.tsx:58 msgid "{0, plural, one {# label has} other {# labels have}} been placed on this account" msgstr "" -#: src/components/moderation/LabelsOnMe.tsx:62 +#: src/components/moderation/LabelsOnMe.tsx:67 msgid "{0, plural, one {# label has} other {# labels have}} been placed on this content" msgstr "" -#: src/screens/Post/PostLikedBy.tsx:41 +#: src/screens/Post/PostLikedBy.tsx:44 msgid "{0, plural, one {# like} other {# likes}}" msgstr "" @@ -62,11 +62,11 @@ msgstr "" msgid "{0, plural, one {# month} other {# months}}" msgstr "" -#: src/screens/Post/PostQuotes.tsx:41 +#: src/screens/Post/PostQuotes.tsx:44 msgid "{0, plural, one {# quote} other {# quotes}}" msgstr "" -#: src/screens/Post/PostRepostedBy.tsx:41 +#: src/screens/Post/PostRepostedBy.tsx:44 msgid "{0, plural, one {# repost} other {# reposts}}" msgstr "" @@ -158,7 +158,7 @@ msgstr "" msgid "{0} joined this week" msgstr "" -#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/Scrubber.tsx:204 +#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/Scrubber.tsx:203 msgid "{0} of {1}" msgstr "" @@ -183,8 +183,8 @@ msgstr "" msgid "{0}, a list by {1}" msgstr "" -#: src/view/com/util/UserAvatar.tsx:572 -#: src/view/com/util/UserAvatar.tsx:590 +#: src/view/com/util/UserAvatar.tsx:577 +#: src/view/com/util/UserAvatar.tsx:595 msgid "{0}'s avatar" msgstr "" @@ -422,11 +422,11 @@ msgstr "" msgid "{notificationCount, plural, one {# unread item} other {# unread items}}" msgstr "" -#: src/components/NewskieDialog.tsx:116 +#: src/components/NewskieDialog.tsx:131 msgid "{profileName} joined Bluesky {0} ago" msgstr "" -#: src/components/NewskieDialog.tsx:111 +#: src/components/NewskieDialog.tsx:126 msgid "{profileName} joined Bluesky using a starter pack {0} ago" msgstr "" @@ -677,8 +677,8 @@ msgstr "" msgid "Add a temporary live status to your profile. When someone clicks on your avatar, they’ll see information about your live event." msgstr "" -#: src/view/screens/ProfileList.tsx:924 -#: src/view/screens/ProfileList.tsx:942 +#: src/screens/ProfileList/AboutSection.tsx:62 +#: src/screens/ProfileList/AboutSection.tsx:80 msgid "Add a user to this list" msgstr "" @@ -748,8 +748,8 @@ msgstr "" msgid "Add muted words and tags" msgstr "" -#: src/view/screens/ProfileList.tsx:932 -#: src/view/screens/ProfileList.tsx:950 +#: src/screens/ProfileList/AboutSection.tsx:70 +#: src/screens/ProfileList/AboutSection.tsx:88 msgid "Add people" msgstr "" @@ -769,7 +769,7 @@ msgstr "" msgid "Add some feeds to your starter pack!" msgstr "" -#: src/screens/Feeds/NoFollowingFeed.tsx:41 +#: src/screens/Feeds/NoFollowingFeed.tsx:39 msgid "Add the default feed of only people you follow" msgstr "" @@ -832,7 +832,7 @@ msgstr "" msgid "Adult content can only be enabled via the Web at <0>bsky.app." msgstr "" -#: src/components/moderation/LabelPreference.tsx:247 +#: src/components/moderation/LabelPreference.tsx:246 msgid "Adult content is disabled." msgstr "" @@ -995,11 +995,11 @@ msgstr "" msgid "An error occurred while loading the video. Please try again later." msgstr "" -#: src/components/Post/Embed/VideoEmbed/index.web.tsx:227 +#: src/components/Post/Embed/VideoEmbed/index.web.tsx:226 msgid "An error occurred while loading the video. Please try again." msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:72 +#: src/components/StarterPack/QrCodeDialog.tsx:75 msgid "An error occurred while saving the QR code!" msgstr "" @@ -1173,7 +1173,7 @@ msgstr "" msgid "Appearance" msgstr "" -#: src/screens/Feeds/NoSavedFeedsOfAnyType.tsx:47 +#: src/screens/Feeds/NoSavedFeedsOfAnyType.tsx:51 #: src/screens/Home/NoFeedsPinned.tsx:93 msgid "Apply default recommended feeds" msgstr "" @@ -1232,7 +1232,7 @@ msgstr "" msgid "Are you sure?" msgstr "" -#: src/view/com/composer/select-language/SuggestedLanguage.tsx:87 +#: src/view/com/composer/select-language/SuggestedLanguage.tsx:89 msgid "Are you writing in <0>{suggestedLanguageName}?" msgstr "" @@ -1366,7 +1366,8 @@ msgstr "" msgid "Block Account?" msgstr "" -#: src/view/screens/ProfileList.tsx:669 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:97 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:100 msgid "Block accounts" msgstr "" @@ -1378,7 +1379,7 @@ msgstr "" msgid "Block and/or delete this conversation" msgstr "" -#: src/view/screens/ProfileList.tsx:789 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:125 msgid "Block list" msgstr "" @@ -1386,7 +1387,7 @@ msgstr "" msgid "Block or report" msgstr "" -#: src/view/screens/ProfileList.tsx:784 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:120 msgid "Block these accounts?" msgstr "" @@ -1425,7 +1426,7 @@ msgstr "" msgid "Blocking does not prevent this labeler from placing labels on your account." msgstr "" -#: src/view/screens/ProfileList.tsx:786 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:122 msgid "Blocking is public. Blocked accounts cannot reply in your threads, mention you, or otherwise interact with you." msgstr "" @@ -1496,11 +1497,11 @@ msgstr "" msgid "Bluesky+ icons" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:53 +#: src/lib/moderation/useLabelBehaviorDescription.ts:56 msgid "Blur images" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:51 +#: src/lib/moderation/useLabelBehaviorDescription.ts:54 msgid "Blur images and filter from feeds" msgstr "" @@ -1711,7 +1712,7 @@ msgstr "" msgid "Change password dialog" msgstr "" -#: src/view/com/composer/select-language/SuggestedLanguage.tsx:98 +#: src/view/com/composer/select-language/SuggestedLanguage.tsx:100 msgid "Change post language to {suggestedLanguageName}" msgstr "" @@ -1875,7 +1876,7 @@ msgstr "" msgid "Click for information" msgstr "" -#: src/view/screens/Support.tsx:41 +#: src/view/screens/Support.tsx:44 msgid "click here" msgstr "" @@ -1929,8 +1930,8 @@ msgstr "" #: src/components/dms/ReportDialog.tsx:395 #: src/components/live/EditLiveDialog.tsx:229 #: src/components/live/EditLiveDialog.tsx:235 -#: src/components/NewskieDialog.tsx:146 -#: src/components/NewskieDialog.tsx:153 +#: src/components/NewskieDialog.tsx:159 +#: src/components/NewskieDialog.tsx:165 #: src/components/Post/Embed/ExternalEmbed/Gif.tsx:197 #: src/components/ProgressGuide/FollowDialog.tsx:379 #: src/components/StarterPack/Wizard/WizardEditListDialog.tsx:118 @@ -1956,7 +1957,7 @@ msgstr "" msgid "Close alert" msgstr "" -#: src/view/com/util/BottomSheetCustomBackdrop.tsx:36 +#: src/view/com/util/BottomSheetCustomBackdrop.tsx:37 msgid "Close bottom drawer" msgstr "" @@ -2052,7 +2053,7 @@ msgstr "" #: src/components/PolicyUpdateOverlay/updates/202508/index.tsx:45 #: src/Navigation.tsx:341 -#: src/view/screens/CommunityGuidelines.tsx:34 +#: src/view/screens/CommunityGuidelines.tsx:37 msgid "Community Guidelines" msgstr "" @@ -2081,11 +2082,11 @@ msgstr "" msgid "Compressing video..." msgstr "" -#: src/components/moderation/LabelPreference.tsx:88 +#: src/components/moderation/LabelPreference.tsx:87 msgid "Configure content filtering setting for category: {name}" msgstr "" -#: src/components/moderation/LabelPreference.tsx:249 +#: src/components/moderation/LabelPreference.tsx:248 msgid "Configured in <0>moderation settings." msgstr "" @@ -2281,7 +2282,7 @@ msgstr "" msgid "Copies build version to clipboard" msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:182 +#: src/components/StarterPack/QrCodeDialog.tsx:192 msgid "Copy" msgstr "" @@ -2294,8 +2295,8 @@ msgstr "" msgid "Copy at:// URI" msgstr "" -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:153 -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:156 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:152 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:155 msgid "Copy author DID" msgstr "" @@ -2314,23 +2315,24 @@ msgstr "" msgid "Copy host" msgstr "" -#: src/components/StarterPack/ShareDialog.tsx:104 +#: src/components/StarterPack/ShareDialog.tsx:113 #: src/screens/StarterPack/StarterPackScreen.tsx:617 msgid "Copy link" msgstr "" -#: src/components/StarterPack/ShareDialog.tsx:111 +#: src/components/StarterPack/ShareDialog.tsx:119 msgid "Copy Link" msgstr "" -#: src/view/screens/ProfileList.tsx:513 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:172 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:176 msgid "Copy link to list" msgstr "" #: src/components/PostControls/ShareMenu/ShareMenuItems.tsx:127 #: src/components/PostControls/ShareMenu/ShareMenuItems.tsx:130 -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:87 -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:90 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:86 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:89 msgid "Copy link to post" msgstr "" @@ -2348,8 +2350,8 @@ msgstr "" msgid "Copy message text" msgstr "" -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:144 -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:147 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:143 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:146 msgid "Copy post at:// URI" msgstr "" @@ -2358,7 +2360,7 @@ msgstr "" msgid "Copy post text" msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:176 +#: src/components/StarterPack/QrCodeDialog.tsx:178 msgid "Copy QR code" msgstr "" @@ -2369,7 +2371,7 @@ msgstr "" #: src/components/PolicyUpdateOverlay/updates/202508/index.tsx:40 #: src/components/PolicyUpdateOverlay/updates/202508/index.tsx:107 #: src/Navigation.tsx:346 -#: src/view/screens/CopyrightPolicy.tsx:31 +#: src/view/screens/CopyrightPolicy.tsx:34 msgid "Copyright Policy" msgstr "" @@ -2394,7 +2396,9 @@ msgstr "" msgid "Could not load feed" msgstr "" -#: src/view/screens/ProfileList.tsx:1029 +#: src/screens/ProfileList/components/ErrorScreen.tsx:26 +#: src/screens/ProfileList/index.tsx:79 +#: src/screens/ProfileList/index.tsx:101 msgid "Could not load list" msgstr "" @@ -2422,7 +2426,7 @@ msgstr "" msgid "Create" msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:160 +#: src/components/StarterPack/QrCodeDialog.tsx:163 msgid "Create a QR code for a starter pack" msgstr "" @@ -2480,7 +2484,7 @@ msgid "Create new account" msgstr "" #: src/components/moderation/ReportDialog/index.tsx:585 -#: src/components/ReportDialog/SelectReportOptionView.tsx:99 +#: src/components/ReportDialog/SelectReportOptionView.tsx:102 msgid "Create report for {0}" msgstr "" @@ -2568,11 +2572,11 @@ msgstr "" #: src/components/dms/MessageContextMenu.tsx:185 #: src/components/PostControls/PostMenu/PostMenuItems.tsx:704 #: src/screens/Messages/components/ChatStatusInfo.tsx:55 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:285 #: src/screens/Settings/AppPasswords.tsx:212 #: src/screens/StarterPack/StarterPackScreen.tsx:599 #: src/screens/StarterPack/StarterPackScreen.tsx:688 #: src/screens/StarterPack/StarterPackScreen.tsx:760 -#: src/view/screens/ProfileList.tsx:768 msgid "Delete" msgstr "" @@ -2617,7 +2621,8 @@ msgstr "" msgid "Delete for me" msgstr "" -#: src/view/screens/ProfileList.tsx:556 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:211 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:214 msgid "Delete list" msgstr "" @@ -2648,7 +2653,7 @@ msgstr "" msgid "Delete starter pack?" msgstr "" -#: src/view/screens/ProfileList.tsx:763 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:280 msgid "Delete this list?" msgstr "" @@ -2737,9 +2742,9 @@ msgstr "" msgid "Disable subtitles" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:32 -#: src/lib/moderation/useLabelBehaviorDescription.ts:42 -#: src/lib/moderation/useLabelBehaviorDescription.ts:68 +#: src/lib/moderation/useLabelBehaviorDescription.ts:35 +#: src/lib/moderation/useLabelBehaviorDescription.ts:45 +#: src/lib/moderation/useLabelBehaviorDescription.ts:71 #: src/screens/Messages/Settings.tsx:144 #: src/screens/Messages/Settings.tsx:147 #: src/screens/Moderation/index.tsx:413 @@ -2898,8 +2903,8 @@ msgstr "" msgid "Download Bluesky" msgstr "" -#: src/screens/Settings/components/ExportCarDialog.tsx:79 -#: src/screens/Settings/components/ExportCarDialog.tsx:84 +#: src/screens/Settings/components/ExportCarDialog.tsx:78 +#: src/screens/Settings/components/ExportCarDialog.tsx:83 msgid "Download CAR file" msgstr "" @@ -2986,7 +2991,8 @@ msgstr "" msgid "Edit interests" msgstr "" -#: src/view/screens/ProfileList.tsx:544 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:203 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:206 msgid "Edit list details" msgstr "" @@ -3094,8 +3100,8 @@ msgstr "" #: src/components/dialogs/Embed.tsx:104 #: src/components/dialogs/Embed.tsx:108 -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:119 -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:124 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:118 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:123 msgid "Embed post" msgstr "" @@ -3422,7 +3428,7 @@ msgctxt "toast" msgid "Failed to accept chat" msgstr "" -#: src/components/dms/ActionsWrapper.web.tsx:67 +#: src/components/dms/ActionsWrapper.web.tsx:66 #: src/components/dms/MessageContextMenu.tsx:99 msgid "Failed to add emoji reaction" msgstr "" @@ -3532,7 +3538,7 @@ msgstr "" msgid "Failed to pin post" msgstr "" -#: src/components/dms/ActionsWrapper.web.tsx:61 +#: src/components/dms/ActionsWrapper.web.tsx:60 #: src/components/dms/MessageContextMenu.tsx:93 msgid "Failed to remove emoji reaction" msgstr "" @@ -3580,6 +3586,10 @@ msgstr "" msgid "Failed to toggle thread mute, please try again" msgstr "" +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:111 +msgid "Failed to unpin list" +msgstr "" + #: src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx:149 #: src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx:83 msgid "Failed to update email 2FA settings" @@ -3658,22 +3668,22 @@ msgid "Feedback sent to feed operator" msgstr "" #: src/Navigation.tsx:574 +#: src/screens/SavedFeeds.tsx:108 #: src/screens/Search/SearchResults.tsx:73 #: src/screens/StarterPack/StarterPackScreen.tsx:190 #: src/view/screens/Feeds.tsx:511 #: src/view/screens/Profile.tsx:230 -#: src/view/screens/SavedFeeds.tsx:104 #: src/view/shell/desktop/LeftNav.tsx:727 #: src/view/shell/Drawer.tsx:530 msgid "Feeds" msgstr "" -#: src/view/screens/SavedFeeds.tsx:206 -msgid "Feeds are custom algorithms that users build with a little coding expertise. <0/> for more information." +#: src/screens/SavedFeeds.tsx:215 +msgid "Feeds are custom algorithms that users build with a little coding expertise. <0>See this guide for more information." msgstr "" #: src/components/FeedCard.tsx:282 -#: src/view/screens/SavedFeeds.tsx:86 +#: src/screens/SavedFeeds.tsx:90 msgctxt "toast" msgid "Feeds updated!" msgstr "" @@ -3690,7 +3700,7 @@ msgstr "" msgid "File saved successfully!" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:66 +#: src/lib/moderation/useLabelBehaviorDescription.ts:69 msgid "Filter from feeds" msgstr "" @@ -3850,8 +3860,8 @@ msgstr "" msgid "Followers of @{0} that you know" msgstr "" -#: src/screens/Profile/KnownFollowers.tsx:104 -#: src/screens/Profile/KnownFollowers.tsx:121 +#: src/screens/Profile/KnownFollowers.tsx:107 +#: src/screens/Profile/KnownFollowers.tsx:124 msgid "Followers you know" msgstr "" @@ -3865,8 +3875,8 @@ msgstr "" msgid "Following" msgstr "" +#: src/screens/SavedFeeds.tsx:410 #: src/view/screens/Feeds.tsx:603 -#: src/view/screens/SavedFeeds.tsx:420 msgctxt "feed-name" msgid "Following" msgstr "" @@ -4068,12 +4078,13 @@ msgstr "" #: src/components/moderation/ScreenHider.tsx:163 #: src/screens/Messages/Inbox.tsx:249 #: src/screens/Profile/ProfileFeed/index.tsx:92 +#: src/screens/ProfileList/components/ErrorScreen.tsx:34 +#: src/screens/ProfileList/components/ErrorScreen.tsx:40 #: src/screens/VideoFeed/components/Header.tsx:163 #: src/screens/VideoFeed/index.tsx:1146 #: src/screens/VideoFeed/index.tsx:1150 #: src/view/com/auth/LoggedOut.tsx:72 #: src/view/screens/NotFound.tsx:57 -#: src/view/screens/ProfileList.tsx:1038 msgid "Go back" msgstr "" @@ -4084,12 +4095,11 @@ msgstr "" #: src/screens/Profile/ProfileFeed/index.tsx:97 #: src/screens/StarterPack/StarterPackScreen.tsx:773 #: src/view/screens/NotFound.tsx:56 -#: src/view/screens/ProfileList.tsx:1043 msgid "Go Back" msgstr "" #: src/components/dms/ReportDialog.tsx:197 -#: src/components/ReportDialog/SelectReportOptionView.tsx:78 +#: src/components/ReportDialog/SelectReportOptionView.tsx:81 #: src/components/ReportDialog/SubmitView.tsx:110 #: src/screens/Onboarding/Layout.tsx:121 #: src/screens/Onboarding/Layout.tsx:214 @@ -4249,13 +4259,13 @@ msgstr "" #: src/components/interstitials/Trending.tsx:131 #: src/components/interstitials/TrendingVideos.tsx:138 #: src/components/moderation/ContentHider.tsx:203 -#: src/components/moderation/LabelPreference.tsx:141 +#: src/components/moderation/LabelPreference.tsx:140 #: src/components/moderation/PostHider.tsx:134 #: src/components/PostControls/PostMenu/PostMenuItems.tsx:715 -#: src/lib/moderation/useLabelBehaviorDescription.ts:15 -#: src/lib/moderation/useLabelBehaviorDescription.ts:20 -#: src/lib/moderation/useLabelBehaviorDescription.ts:25 -#: src/lib/moderation/useLabelBehaviorDescription.ts:30 +#: src/lib/moderation/useLabelBehaviorDescription.ts:18 +#: src/lib/moderation/useLabelBehaviorDescription.ts:23 +#: src/lib/moderation/useLabelBehaviorDescription.ts:28 +#: src/lib/moderation/useLabelBehaviorDescription.ts:33 #: src/view/shell/desktop/SidebarTrendingTopics.tsx:111 msgid "Hide" msgstr "" @@ -4406,7 +4416,7 @@ msgstr "" msgid "If you are not yet an adult according to the laws of your country, your parent or legal guardian must read these Terms on your behalf." msgstr "" -#: src/view/screens/ProfileList.tsx:765 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:282 msgid "If you delete this list, you won't be able to recover it." msgstr "" @@ -4447,7 +4457,7 @@ msgstr "" msgid "Illegal and Urgent" msgstr "" -#: src/view/com/util/images/Gallery.tsx:71 +#: src/view/com/util/images/Gallery.tsx:70 msgid "Image" msgstr "" @@ -4593,7 +4603,7 @@ msgstr "" msgid "Invite codes: 1 available" msgstr "" -#: src/components/StarterPack/ShareDialog.tsx:77 +#: src/components/StarterPack/ShareDialog.tsx:81 msgid "Invite people to this starter pack!" msgstr "" @@ -4875,9 +4885,9 @@ msgstr "" msgid "Liked by" msgstr "" -#: src/screens/Post/PostLikedBy.tsx:38 -#: src/screens/Profile/ProfileLabelerLikedBy.tsx:29 -#: src/view/screens/ProfileFeedLikedBy.tsx:30 +#: src/screens/Post/PostLikedBy.tsx:41 +#: src/screens/Profile/ProfileLabelerLikedBy.tsx:32 +#: src/view/screens/ProfileFeedLikedBy.tsx:33 msgid "Liked By" msgstr "" @@ -4927,7 +4937,7 @@ msgstr "" msgid "List Avatar" msgstr "" -#: src/view/screens/ProfileList.tsx:438 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:50 msgctxt "toast" msgid "List blocked" msgstr "" @@ -4949,7 +4959,7 @@ msgstr "" msgid "List creator" msgstr "" -#: src/view/screens/ProfileList.tsx:485 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:97 msgctxt "toast" msgid "List deleted" msgstr "" @@ -4958,11 +4968,11 @@ msgstr "" msgid "List has been hidden" msgstr "" -#: src/view/screens/ProfileList.tsx:176 +#: src/screens/ProfileList/index.tsx:172 msgid "List Hidden" msgstr "" -#: src/view/screens/ProfileList.tsx:402 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:31 msgctxt "toast" msgid "List muted" msgstr "" @@ -4971,12 +4981,14 @@ msgstr "" msgid "List Name" msgstr "" -#: src/view/screens/ProfileList.tsx:456 +#: src/screens/ProfileList/components/Header.tsx:116 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:138 msgctxt "toast" msgid "List unblocked" msgstr "" -#: src/view/screens/ProfileList.tsx:420 +#: src/screens/ProfileList/components/Header.tsx:98 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:120 msgctxt "toast" msgid "List unmuted" msgstr "" @@ -5025,8 +5037,8 @@ msgstr "" #: src/screens/Profile/ProfileFeed/index.tsx:224 #: src/screens/Profile/Sections/Feed.tsx:98 -#: src/view/com/feeds/FeedPage.tsx:162 -#: src/view/screens/ProfileList.tsx:878 +#: src/screens/ProfileList/FeedSection.tsx:105 +#: src/view/com/feeds/FeedPage.tsx:169 msgid "Load new posts" msgstr "" @@ -5059,7 +5071,7 @@ msgstr "" msgid "Looks like XXXXX-XXXXX" msgstr "" -#: src/screens/Feeds/NoSavedFeedsOfAnyType.tsx:39 +#: src/screens/Feeds/NoSavedFeedsOfAnyType.tsx:43 msgid "Looks like you haven't saved any feeds! Use our recommendations or browse more below." msgstr "" @@ -5067,7 +5079,7 @@ msgstr "" msgid "Looks like you unpinned all your feeds. But don't worry, you can add some below 😄" msgstr "" -#: src/screens/Feeds/NoFollowingFeed.tsx:37 +#: src/screens/Feeds/NoFollowingFeed.tsx:35 msgid "Looks like you're missing a following feed. <0>Click here to add one." msgstr "" @@ -5249,7 +5261,7 @@ msgstr "" msgid "Moderation Lists" msgstr "" -#: src/components/moderation/LabelPreference.tsx:252 +#: src/components/moderation/LabelPreference.tsx:251 msgid "moderation settings" msgstr "" @@ -5276,12 +5288,20 @@ msgstr "" msgid "More languages..." msgstr "" +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:156 #: src/view/com/profile/ProfileMenu.tsx:223 #: src/view/com/profile/ProfileMenu.tsx:229 -#: src/view/screens/ProfileList.tsx:750 msgid "More options" msgstr "" +#: src/screens/SavedFeeds.tsx:329 +msgid "Move feed down" +msgstr "" + +#: src/screens/SavedFeeds.tsx:320 +msgid "Move feed up" +msgstr "" + #: src/screens/Onboarding/state.ts:113 msgid "Movies" msgstr "" @@ -5291,7 +5311,7 @@ msgid "Music" msgstr "" #: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerNative.tsx:153 -#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx:96 +#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx:95 msgctxt "video" msgid "Mute" msgstr "" @@ -5308,7 +5328,8 @@ msgstr "" msgid "Mute account" msgstr "" -#: src/view/screens/ProfileList.tsx:657 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:89 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:92 msgid "Mute accounts" msgstr "" @@ -5321,11 +5342,11 @@ msgstr "" msgid "Mute in:" msgstr "" -#: src/view/screens/ProfileList.tsx:779 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:115 msgid "Mute list" msgstr "" -#: src/view/screens/ProfileList.tsx:774 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:110 msgid "Mute these accounts?" msgstr "" @@ -5384,7 +5405,7 @@ msgstr "" msgid "Muted words & tags" msgstr "" -#: src/view/screens/ProfileList.tsx:776 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:112 msgid "Muting is private. Muted accounts can interact with you, but you will not see their posts or receive notifications from them." msgstr "" @@ -5444,7 +5465,7 @@ msgstr "" msgid "Need to report a copyright violation, legal request, or regulatory compliance issue?" msgstr "" -#: src/components/ReportDialog/SelectReportOptionView.tsx:128 +#: src/components/ReportDialog/SelectReportOptionView.tsx:131 msgid "Need to report a copyright violation?" msgstr "" @@ -5526,15 +5547,15 @@ msgid "New password" msgstr "" #: src/screens/Profile/ProfileFeed/index.tsx:241 +#: src/screens/ProfileList/index.tsx:246 +#: src/screens/ProfileList/index.tsx:284 #: src/view/screens/Feeds.tsx:552 #: src/view/screens/Notifications.tsx:167 #: src/view/screens/Profile.tsx:510 -#: src/view/screens/ProfileList.tsx:250 -#: src/view/screens/ProfileList.tsx:288 msgid "New post" msgstr "" -#: src/view/com/feeds/FeedPage.tsx:173 +#: src/view/com/feeds/FeedPage.tsx:180 msgctxt "action" msgid "New post" msgstr "" @@ -5556,7 +5577,7 @@ msgstr "" msgid "New starter pack" msgstr "" -#: src/components/NewskieDialog.tsx:83 +#: src/components/NewskieDialog.tsx:102 msgid "New user info dialog" msgstr "" @@ -5697,7 +5718,7 @@ msgstr "" msgid "No results for \"{0}\"." msgstr "" -#: src/components/Lists.tsx:190 +#: src/components/Lists.tsx:189 msgid "No results found" msgstr "" @@ -5774,7 +5795,7 @@ msgstr "" msgid "Note: Bluesky is an open and public network. This setting only limits the visibility of your content on the Bluesky app and website, and other apps may not respect this setting. Your content may still be shown to logged-out users by other apps and websites." msgstr "" -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:134 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:133 msgid "Note: This post is only visible to logged-in users." msgstr "" @@ -5845,7 +5866,7 @@ msgstr "" msgid "Nudity or adult content not labeled as such" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:11 +#: src/lib/moderation/useLabelBehaviorDescription.ts:14 #: src/screens/Settings/NotificationSettings/index.tsx:291 msgid "Off" msgstr "" @@ -5926,15 +5947,15 @@ msgstr "" msgid "Only image files are supported" msgstr "" -#: src/view/com/composer/videos/SubtitleFilePicker.tsx:40 +#: src/view/com/composer/videos/SubtitleFilePicker.tsx:41 msgid "Only WebVTT (.vtt) files are supported" msgstr "" -#: src/components/Lists.tsx:95 +#: src/components/Lists.tsx:94 msgid "Oops, something went wrong!" msgstr "" -#: src/components/Lists.tsx:174 +#: src/components/Lists.tsx:173 #: src/components/StarterPack/ProfileStarterPacks.tsx:332 #: src/components/StarterPack/ProfileStarterPacks.tsx:341 #: src/screens/Settings/AppPasswords.tsx:59 @@ -5998,7 +6019,7 @@ msgstr "" msgid "Open pack" msgstr "" -#: src/components/PostControls/PostMenu/index.tsx:65 +#: src/components/PostControls/PostMenu/index.tsx:64 msgid "Open post options menu" msgstr "" @@ -6007,7 +6028,7 @@ msgstr "" msgid "Open profile" msgstr "" -#: src/components/PostControls/ShareMenu/index.tsx:90 +#: src/components/PostControls/ShareMenu/index.tsx:89 msgid "Open share menu" msgstr "" @@ -6091,7 +6112,7 @@ msgstr "" msgid "Opens list of invite codes" msgstr "" -#: src/view/com/util/UserAvatar.tsx:576 +#: src/view/com/util/UserAvatar.tsx:581 msgid "Opens live status dialog" msgstr "" @@ -6104,7 +6125,7 @@ msgid "Opens post language settings" msgstr "" #: src/view/com/notifications/NotificationFeedItem.tsx:906 -#: src/view/com/util/UserAvatar.tsx:594 +#: src/view/com/util/UserAvatar.tsx:599 msgid "Opens this profile" msgstr "" @@ -6167,7 +6188,7 @@ msgstr "" msgid "Our moderators have reviewed reports and decided to disable your access to chats on Bluesky." msgstr "" -#: src/components/Lists.tsx:191 +#: src/components/Lists.tsx:190 #: src/view/screens/NotFound.tsx:47 msgid "Page not found" msgstr "" @@ -6211,9 +6232,9 @@ msgstr "" msgid "Pause video" msgstr "" +#: src/screens/ProfileList/index.tsx:166 #: src/screens/Search/SearchResults.tsx:67 #: src/screens/StarterPack/StarterPackScreen.tsx:189 -#: src/view/screens/ProfileList.tsx:170 msgid "People" msgstr "" @@ -6253,6 +6274,7 @@ msgstr "" #: src/screens/Profile/components/ProfileFeedHeader.tsx:523 #: src/screens/Profile/components/ProfileFeedHeader.tsx:530 +#: src/screens/SavedFeeds.tsx:351 msgid "Pin feed" msgstr "" @@ -6260,7 +6282,8 @@ msgstr "" msgid "Pin Feed" msgstr "" -#: src/view/screens/ProfileList.tsx:714 +#: src/screens/ProfileList/components/Header.tsx:156 +#: src/screens/ProfileList/components/Header.tsx:163 msgid "Pin to home" msgstr "" @@ -6282,11 +6305,11 @@ msgstr "" msgid "Pinned {0} to Home" msgstr "" -#: src/view/screens/SavedFeeds.tsx:131 +#: src/screens/SavedFeeds.tsx:142 msgid "Pinned Feeds" msgstr "" -#: src/view/screens/ProfileList.tsx:361 +#: src/screens/ProfileList/components/Header.tsx:74 msgid "Pinned to your feeds" msgstr "" @@ -6562,10 +6585,10 @@ msgstr "" #: src/components/activity-notifications/SubscribeProfileDialog.tsx:250 #: src/components/activity-notifications/SubscribeProfileDialog.tsx:262 +#: src/screens/ProfileList/index.tsx:166 #: src/screens/Settings/NotificationSettings/ActivityNotificationSettings.tsx:213 #: src/screens/StarterPack/StarterPackScreen.tsx:191 #: src/view/screens/Profile.tsx:225 -#: src/view/screens/ProfileList.tsx:170 msgid "Posts" msgstr "" @@ -6594,7 +6617,7 @@ msgid "Press to attempt reconnection" msgstr "" #: src/components/Error.tsx:60 -#: src/components/Lists.tsx:100 +#: src/components/Lists.tsx:99 #: src/screens/Messages/components/MessageListError.tsx:24 #: src/screens/Signup/BackNextButtons.tsx:47 msgid "Press to retry" @@ -6643,7 +6666,7 @@ msgstr "" #: src/Navigation.tsx:331 #: src/screens/Settings/AboutSettings.tsx:92 #: src/screens/Settings/AboutSettings.tsx:95 -#: src/view/screens/PrivacyPolicy.tsx:31 +#: src/view/screens/PrivacyPolicy.tsx:34 #: src/view/shell/Drawer.tsx:704 #: src/view/shell/Drawer.tsx:705 msgid "Privacy Policy" @@ -6723,15 +6746,15 @@ msgstr "" msgid "Push, People you follow" msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:134 +#: src/components/StarterPack/QrCodeDialog.tsx:137 msgid "QR code copied to your clipboard!" msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:112 +#: src/components/StarterPack/QrCodeDialog.tsx:115 msgid "QR code has been downloaded!" msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:113 +#: src/components/StarterPack/QrCodeDialog.tsx:116 msgid "QR code saved to your camera roll!" msgstr "" @@ -6766,7 +6789,7 @@ msgid "Quote settings" msgstr "" #: src/lib/hooks/useNotificationHandler.ts:154 -#: src/screens/Post/PostQuotes.tsx:38 +#: src/screens/Post/PostQuotes.tsx:41 #: src/screens/Settings/NotificationSettings/index.tsx:170 #: src/screens/Settings/NotificationSettings/QuoteNotificationSettings.tsx:41 msgid "Quotes" @@ -6929,7 +6952,7 @@ msgstr "" msgid "Remove Banner" msgstr "" -#: src/screens/Messages/components/MessageInputEmbed.tsx:209 +#: src/screens/Messages/components/MessageInputEmbed.tsx:212 msgid "Remove embed" msgstr "" @@ -6945,8 +6968,9 @@ msgstr "" #: src/screens/Profile/components/ProfileFeedHeader.tsx:319 #: src/screens/Profile/components/ProfileFeedHeader.tsx:325 -#: src/view/screens/ProfileList.tsx:528 -#: src/view/screens/SavedFeeds.tsx:350 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:188 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:191 +#: src/screens/SavedFeeds.tsx:340 msgid "Remove from my feeds" msgstr "" @@ -7040,8 +7064,8 @@ msgid "Removed from starter pack" msgstr "" #: src/screens/Profile/components/ProfileFeedHeader.tsx:122 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:74 #: src/view/com/posts/FeedShutdownMsg.tsx:44 -#: src/view/screens/ProfileList.tsx:392 msgid "Removed from your feeds" msgstr "" @@ -7167,7 +7191,8 @@ msgstr "" msgid "Report feed" msgstr "" -#: src/view/screens/ProfileList.tsx:570 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:222 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:225 msgid "Report list" msgstr "" @@ -7189,39 +7214,39 @@ msgstr "" msgid "Report submitted" msgstr "" -#: src/components/ReportDialog/SelectReportOptionView.tsx:41 +#: src/components/ReportDialog/SelectReportOptionView.tsx:44 msgid "Report this content" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:31 -#: src/components/ReportDialog/SelectReportOptionView.tsx:54 +#: src/components/ReportDialog/SelectReportOptionView.tsx:57 msgid "Report this feed" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:25 -#: src/components/ReportDialog/SelectReportOptionView.tsx:51 +#: src/components/ReportDialog/SelectReportOptionView.tsx:54 msgid "Report this list" msgstr "" #: src/components/dms/ReportDialog.tsx:61 #: src/components/dms/ReportDialog.tsx:185 #: src/components/moderation/ReportDialog/copy.ts:43 -#: src/components/ReportDialog/SelectReportOptionView.tsx:60 +#: src/components/ReportDialog/SelectReportOptionView.tsx:63 msgid "Report this message" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:19 -#: src/components/ReportDialog/SelectReportOptionView.tsx:48 +#: src/components/ReportDialog/SelectReportOptionView.tsx:51 msgid "Report this post" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:37 -#: src/components/ReportDialog/SelectReportOptionView.tsx:57 +#: src/components/ReportDialog/SelectReportOptionView.tsx:60 msgid "Report this starter pack" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:13 -#: src/components/ReportDialog/SelectReportOptionView.tsx:45 +#: src/components/ReportDialog/SelectReportOptionView.tsx:48 msgid "Report this user" msgstr "" @@ -7249,7 +7274,7 @@ msgstr "" msgid "Repost or quote post" msgstr "" -#: src/screens/Post/PostRepostedBy.tsx:38 +#: src/screens/Post/PostRepostedBy.tsx:41 msgid "Reposted By" msgstr "" @@ -7354,10 +7379,10 @@ msgstr "" #: src/components/dms/MessageItem.tsx:322 #: src/components/Error.tsx:65 -#: src/components/Lists.tsx:111 +#: src/components/Lists.tsx:110 #: src/components/moderation/ReportDialog/index.tsx:229 -#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx:55 -#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx:57 +#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx:54 +#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx:56 #: src/components/StarterPack/ProfileStarterPacks.tsx:346 #: src/screens/Login/LoginForm.tsx:323 #: src/screens/Login/LoginForm.tsx:330 @@ -7391,10 +7416,10 @@ msgid "Returns to home page" msgstr "" #: src/screens/Profile/ProfileFeed/index.tsx:93 +#: src/screens/ProfileList/components/ErrorScreen.tsx:35 #: src/screens/Settings/components/ChangeHandleDialog.tsx:569 #: src/screens/VideoFeed/index.tsx:1147 #: src/view/screens/NotFound.tsx:60 -#: src/view/screens/ProfileList.tsx:1039 msgid "Returns to previous page" msgstr "" @@ -7407,9 +7432,10 @@ msgstr "" #: src/components/dialogs/PostInteractionSettingsDialog.tsx:489 #: src/components/live/EditLiveDialog.tsx:216 #: src/components/live/EditLiveDialog.tsx:223 -#: src/components/StarterPack/QrCodeDialog.tsx:192 +#: src/components/StarterPack/QrCodeDialog.tsx:204 #: src/screens/Profile/Header/EditProfileDialog.tsx:238 #: src/screens/Profile/Header/EditProfileDialog.tsx:252 +#: src/screens/SavedFeeds.tsx:120 #: src/screens/Settings/components/ChangeHandleDialog.tsx:267 #: src/view/com/composer/GifAltText.tsx:193 #: src/view/com/composer/GifAltText.tsx:202 @@ -7418,7 +7444,6 @@ msgstr "" #: src/view/com/composer/photos/ImageAltTextDialog.tsx:152 #: src/view/com/composer/photos/ImageAltTextDialog.tsx:162 #: src/view/com/modals/CreateOrEditList.tsx:315 -#: src/view/screens/SavedFeeds.tsx:117 msgid "Save" msgstr "" @@ -7434,13 +7459,13 @@ msgstr "" #: src/components/activity-notifications/SubscribeProfileDialog.tsx:191 #: src/components/activity-notifications/SubscribeProfileDialog.tsx:200 -#: src/view/screens/SavedFeeds.tsx:113 -#: src/view/screens/SavedFeeds.tsx:117 +#: src/screens/SavedFeeds.tsx:116 +#: src/screens/SavedFeeds.tsx:120 msgid "Save changes" msgstr "" -#: src/components/StarterPack/ShareDialog.tsx:131 #: src/components/StarterPack/ShareDialog.tsx:138 +#: src/components/StarterPack/ShareDialog.tsx:144 msgid "Save image" msgstr "" @@ -7452,7 +7477,7 @@ msgstr "" msgid "Save new handle" msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:186 +#: src/components/StarterPack/QrCodeDialog.tsx:196 msgid "Save QR code" msgstr "" @@ -7467,7 +7492,7 @@ msgctxt "link to bookmarks screen" msgid "Saved" msgstr "" -#: src/view/screens/SavedFeeds.tsx:172 +#: src/screens/SavedFeeds.tsx:184 msgid "Saved Feeds" msgstr "" @@ -7478,7 +7503,7 @@ msgid "Saved Posts" msgstr "" #: src/screens/Profile/components/ProfileFeedHeader.tsx:132 -#: src/view/screens/ProfileList.tsx:372 +#: src/screens/ProfileList/components/Header.tsx:85 msgid "Saved to your feeds" msgstr "" @@ -7487,7 +7512,7 @@ msgid "Saves image crop settings" msgstr "" #: src/components/dms/ChatEmptyPill.tsx:33 -#: src/components/NewskieDialog.tsx:105 +#: src/components/NewskieDialog.tsx:121 #: src/view/com/notifications/NotificationFeedItem.tsx:751 #: src/view/com/notifications/NotificationFeedItem.tsx:776 msgid "Say hello!" @@ -7506,7 +7531,7 @@ msgstr "" msgid "Scroll right" msgstr "" -#: src/view/screens/ProfileList.tsx:996 +#: src/screens/ProfileList/AboutSection.tsx:130 msgid "Scroll to top" msgstr "" @@ -7639,11 +7664,11 @@ msgstr "" msgid "See more suggested profiles on the Explore page" msgstr "" -#: src/view/screens/SavedFeeds.tsx:213 +#: src/screens/SavedFeeds.tsx:220 msgid "See this guide" msgstr "" -#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/Scrubber.tsx:197 +#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/Scrubber.tsx:196 msgid "Seek slider. Use the arrow keys to seek forwards and backwards, and space to play/pause" msgstr "" @@ -7743,8 +7768,8 @@ msgstr "" msgid "Select primary language" msgstr "" -#: src/view/com/composer/videos/SubtitleFilePicker.tsx:59 -#: src/view/com/composer/videos/SubtitleFilePicker.tsx:66 +#: src/view/com/composer/videos/SubtitleFilePicker.tsx:60 +#: src/view/com/composer/videos/SubtitleFilePicker.tsx:67 msgid "Select subtitle file (.vtt)" msgstr "" @@ -7849,8 +7874,8 @@ msgstr "" #: src/components/PostControls/ShareMenu/ShareMenuItems.tsx:101 #: src/components/PostControls/ShareMenu/ShareMenuItems.tsx:107 -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:104 -#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:110 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:103 +#: src/components/PostControls/ShareMenu/ShareMenuItems.web.tsx:109 msgid "Send via direct message" msgstr "" @@ -7946,11 +7971,10 @@ msgstr "" msgid "Sexually Suggestive" msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:182 +#: src/components/StarterPack/QrCodeDialog.tsx:192 #: src/screens/Hashtag.tsx:126 #: src/screens/StarterPack/StarterPackScreen.tsx:433 #: src/screens/Topic.tsx:102 -#: src/view/screens/ProfileList.tsx:513 msgid "Share" msgstr "" @@ -7978,12 +8002,12 @@ msgstr "" #: src/components/dialogs/LinkWarning.tsx:96 #: src/components/dialogs/LinkWarning.tsx:104 -#: src/components/StarterPack/ShareDialog.tsx:104 -#: src/components/StarterPack/ShareDialog.tsx:111 +#: src/components/StarterPack/ShareDialog.tsx:113 +#: src/components/StarterPack/ShareDialog.tsx:119 msgid "Share link" msgstr "" -#: src/components/StarterPack/ShareDialog.tsx:68 +#: src/components/StarterPack/ShareDialog.tsx:72 msgid "Share link dialog" msgstr "" @@ -7992,8 +8016,8 @@ msgstr "" msgid "Share post at:// URI" msgstr "" -#: src/components/StarterPack/ShareDialog.tsx:115 -#: src/components/StarterPack/ShareDialog.tsx:126 +#: src/components/StarterPack/ShareDialog.tsx:123 +#: src/components/StarterPack/ShareDialog.tsx:133 msgid "Share QR code" msgstr "" @@ -8005,12 +8029,14 @@ msgstr "" msgid "Share this starter pack" msgstr "" -#: src/components/StarterPack/ShareDialog.tsx:80 +#: src/components/StarterPack/ShareDialog.tsx:84 msgid "Share this starter pack and help people join your community on Bluesky." msgstr "" #: src/components/PostControls/ShareMenu/ShareMenuItems.tsx:117 #: src/components/PostControls/ShareMenu/ShareMenuItems.tsx:120 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:172 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:178 #: src/screens/StarterPack/StarterPackScreen.tsx:611 #: src/screens/StarterPack/StarterPackScreen.tsx:619 #: src/view/com/profile/ProfileMenu.tsx:246 @@ -8027,7 +8053,7 @@ msgid "Shared Preferences Tester" msgstr "" #: src/components/moderation/ContentHider.tsx:203 -#: src/components/moderation/LabelPreference.tsx:143 +#: src/components/moderation/LabelPreference.tsx:142 #: src/components/moderation/PostHider.tsx:134 msgid "Show" msgstr "" @@ -8044,12 +8070,12 @@ msgstr "" msgid "Show anyway" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:27 -#: src/lib/moderation/useLabelBehaviorDescription.ts:63 +#: src/lib/moderation/useLabelBehaviorDescription.ts:30 +#: src/lib/moderation/useLabelBehaviorDescription.ts:66 msgid "Show badge" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:61 +#: src/lib/moderation/useLabelBehaviorDescription.ts:64 msgid "Show badge and filter from feeds" msgstr "" @@ -8116,11 +8142,11 @@ msgstr "" msgid "Show samples of your saved feeds in your Following feed" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:58 +#: src/lib/moderation/useLabelBehaviorDescription.ts:61 msgid "Show warning" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:56 +#: src/lib/moderation/useLabelBehaviorDescription.ts:59 msgid "Show warning and filter from feeds" msgstr "" @@ -8299,7 +8325,7 @@ msgstr "" msgid "Something went wrong, please try again." msgstr "" -#: src/components/Lists.tsx:175 +#: src/components/Lists.tsx:174 msgid "Something went wrong!" msgstr "" @@ -8363,13 +8389,13 @@ msgstr "" msgid "Start a new chat" msgstr "" -#: src/view/screens/ProfileList.tsx:846 -#: src/view/screens/ProfileList.tsx:967 +#: src/screens/ProfileList/AboutSection.tsx:102 +#: src/screens/ProfileList/FeedSection.tsx:74 msgid "Start adding people" msgstr "" -#: src/view/screens/ProfileList.tsx:853 -#: src/view/screens/ProfileList.tsx:974 +#: src/screens/ProfileList/AboutSection.tsx:108 +#: src/screens/ProfileList/FeedSection.tsx:80 msgid "Start adding people!" msgstr "" @@ -8450,7 +8476,7 @@ msgstr "" msgid "Submit report" msgstr "" -#: src/view/screens/ProfileList.tsx:741 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:81 msgid "Subscribe" msgstr "" @@ -8470,7 +8496,7 @@ msgstr "" msgid "Subscribe to this labeler" msgstr "" -#: src/view/screens/ProfileList.tsx:737 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:69 msgid "Subscribe to this list" msgstr "" @@ -8513,8 +8539,8 @@ msgid "Sunset" msgstr "" #: src/Navigation.tsx:326 -#: src/view/screens/Support.tsx:31 #: src/view/screens/Support.tsx:34 +#: src/view/screens/Support.tsx:37 msgid "Support" msgstr "" @@ -8622,7 +8648,7 @@ msgstr "" #: src/Navigation.tsx:336 #: src/screens/Settings/AboutSettings.tsx:84 #: src/screens/Settings/AboutSettings.tsx:87 -#: src/view/screens/TermsOfService.tsx:31 +#: src/view/screens/TermsOfService.tsx:34 #: src/view/shell/Drawer.tsx:697 #: src/view/shell/Drawer.tsx:699 msgid "Terms of Service" @@ -8717,11 +8743,11 @@ msgstr "" msgid "The Bluesky web application" msgstr "" -#: src/view/screens/CommunityGuidelines.tsx:38 +#: src/view/screens/CommunityGuidelines.tsx:41 msgid "The Community Guidelines have been moved to <0/>" msgstr "" -#: src/view/screens/CopyrightPolicy.tsx:35 +#: src/view/screens/CopyrightPolicy.tsx:38 msgid "The Copyright Policy has been moved to <0/>" msgstr "" @@ -8765,7 +8791,7 @@ msgstr "" msgid "The open social network." msgstr "" -#: src/view/screens/PrivacyPolicy.tsx:35 +#: src/view/screens/PrivacyPolicy.tsx:38 msgid "The Privacy Policy has been moved to <0/>" msgstr "" @@ -8783,15 +8809,15 @@ msgstr "" msgid "The starter pack that you are trying to view is invalid. You may delete this starter pack instead." msgstr "" -#: src/components/ContextMenu/index.tsx:433 +#: src/components/ContextMenu/index.tsx:434 msgid "The subject of the context menu" msgstr "" -#: src/view/screens/Support.tsx:37 +#: src/view/screens/Support.tsx:40 msgid "The support form has been moved. If you need help, please <0/> or visit {HELP_DESK_URL} to get in touch with us." msgstr "" -#: src/view/screens/TermsOfService.tsx:35 +#: src/view/screens/TermsOfService.tsx:38 msgid "The Terms of Service have been moved to" msgstr "" @@ -8812,9 +8838,9 @@ msgid "There was an issue connecting to Tenor." msgstr "" #: src/screens/Profile/components/ProfileFeedHeader.tsx:178 -#: src/view/screens/ProfileList.tsx:375 -#: src/view/screens/ProfileList.tsx:394 -#: src/view/screens/SavedFeeds.tsx:93 +#: src/screens/ProfileList/components/Header.tsx:88 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:76 +#: src/screens/SavedFeeds.tsx:97 msgid "There was an issue contacting the server" msgstr "" @@ -8828,7 +8854,7 @@ msgid "There was an issue fetching notifications. Tap here to try again." msgstr "" #: src/screens/Search/Explore.tsx:986 -#: src/view/com/posts/PostFeed.tsx:701 +#: src/view/com/posts/PostFeed.tsx:709 msgid "There was an issue fetching posts. Tap here to try again." msgstr "" @@ -8885,10 +8911,12 @@ msgstr "" #: src/screens/List/ListHiddenScreen.tsx:63 #: src/screens/List/ListHiddenScreen.tsx:77 #: src/screens/List/ListHiddenScreen.tsx:99 -#: src/view/screens/ProfileList.tsx:411 -#: src/view/screens/ProfileList.tsx:429 -#: src/view/screens/ProfileList.tsx:447 -#: src/view/screens/ProfileList.tsx:465 +#: src/screens/ProfileList/components/Header.tsx:107 +#: src/screens/ProfileList/components/Header.tsx:125 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:129 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:147 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:40 +#: src/screens/ProfileList/components/SubscribeMenu.tsx:59 msgid "There was an issue. Please check your internet connection and try again." msgstr "" @@ -8979,7 +9007,7 @@ msgstr "" msgid "This feature allows users to receive notifications for your new posts and replies. Who do you want to enable this for?" msgstr "" -#: src/screens/Settings/components/ExportCarDialog.tsx:96 +#: src/screens/Settings/components/ExportCarDialog.tsx:95 msgid "This feature is in beta. You can read more about repository exports in <0>this blogpost." msgstr "" @@ -9001,7 +9029,7 @@ msgstr "" #: src/components/StarterPack/Main/PostsList.tsx:36 #: src/screens/Profile/ProfileFeed/index.tsx:192 -#: src/view/screens/ProfileList.tsx:843 +#: src/screens/ProfileList/FeedSection.tsx:71 msgid "This feed is empty." msgstr "" @@ -9046,7 +9074,7 @@ msgstr "" msgid "This list – created by you – contains possible violations of Bluesky's community guidelines in its name or description." msgstr "" -#: src/view/screens/ProfileList.tsx:962 +#: src/screens/ProfileList/AboutSection.tsx:98 msgid "This list is empty." msgstr "" @@ -9127,7 +9155,7 @@ msgstr "" msgid "This user is included in the <0>{0} list which you have muted." msgstr "" -#: src/components/NewskieDialog.tsx:65 +#: src/components/NewskieDialog.tsx:47 msgid "This user is new here. Press for more info about when they joined." msgstr "" @@ -9315,8 +9343,9 @@ msgstr "" #: src/components/dms/MessagesListBlockedFooter.tsx:119 #: src/screens/Profile/Header/ProfileHeaderStandard.tsx:208 #: src/screens/Profile/Header/ProfileHeaderStandard.tsx:328 +#: src/screens/ProfileList/components/Header.tsx:171 +#: src/screens/ProfileList/components/Header.tsx:178 #: src/view/com/profile/ProfileMenu.tsx:490 -#: src/view/screens/ProfileList.tsx:723 msgid "Unblock" msgstr "" @@ -9337,7 +9366,8 @@ msgstr "" msgid "Unblock Account?" msgstr "" -#: src/view/screens/ProfileList.tsx:620 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:254 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:257 msgid "Unblock list" msgstr "" @@ -9396,12 +9426,13 @@ msgid "Unlike ({0, plural, one {# like} other {# likes}})" msgstr "" #: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerNative.tsx:152 -#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx:95 +#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx:94 msgctxt "video" msgid "Unmute" msgstr "" -#: src/view/screens/ProfileList.tsx:730 +#: src/screens/ProfileList/components/Header.tsx:185 +#: src/screens/ProfileList/components/Header.tsx:192 msgid "Unmute" msgstr "" @@ -9421,7 +9452,8 @@ msgstr "" msgid "Unmute conversation" msgstr "" -#: src/view/screens/ProfileList.tsx:605 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:264 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:267 msgid "Unmute list" msgstr "" @@ -9434,12 +9466,14 @@ msgstr "" msgid "Unmute video" msgstr "" -#: src/view/screens/ProfileList.tsx:714 +#: src/screens/ProfileList/components/Header.tsx:156 +#: src/screens/ProfileList/components/Header.tsx:163 msgid "Unpin" msgstr "" #: src/screens/Profile/components/ProfileFeedHeader.tsx:523 #: src/screens/Profile/components/ProfileFeedHeader.tsx:530 +#: src/screens/SavedFeeds.tsx:351 msgid "Unpin feed" msgstr "" @@ -9457,7 +9491,8 @@ msgstr "" msgid "Unpin from profile" msgstr "" -#: src/view/screens/ProfileList.tsx:585 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:237 +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:240 msgid "Unpin moderation list" msgstr "" @@ -9465,10 +9500,14 @@ msgstr "" msgid "Unpinned {0} from Home" msgstr "" -#: src/view/screens/ProfileList.tsx:362 +#: src/screens/ProfileList/components/Header.tsx:75 msgid "Unpinned from your feeds" msgstr "" +#: src/screens/ProfileList/components/MoreOptionsMenu.tsx:109 +msgid "Unpinned list" +msgstr "" + #: src/screens/Settings/Settings.tsx:474 #: src/screens/Settings/Settings.tsx:476 msgid "Unsnooze email reminder" @@ -9604,7 +9643,7 @@ msgstr "" msgid "Use my default browser" msgstr "" -#: src/screens/Feeds/NoSavedFeedsOfAnyType.tsx:53 +#: src/screens/Feeds/NoSavedFeedsOfAnyType.tsx:56 msgid "Use recommended" msgstr "" @@ -9831,7 +9870,7 @@ msgstr "" msgid "Video is playing" msgstr "" -#: src/components/Post/Embed/VideoEmbed/index.web.tsx:220 +#: src/components/Post/Embed/VideoEmbed/index.web.tsx:219 msgid "Video not found." msgstr "" @@ -9880,7 +9919,7 @@ msgstr "" msgid "View blocked user's profile" msgstr "" -#: src/screens/Settings/components/ExportCarDialog.tsx:100 +#: src/screens/Settings/components/ExportCarDialog.tsx:99 msgid "View blogpost for more details" msgstr "" @@ -9888,13 +9927,13 @@ msgstr "" msgid "View debug entry" msgstr "" -#: src/components/ReportDialog/SelectReportOptionView.tsx:137 +#: src/components/ReportDialog/SelectReportOptionView.tsx:140 #: src/screens/VideoFeed/index.tsx:659 #: src/screens/VideoFeed/index.tsx:677 msgid "View details" msgstr "" -#: src/components/ReportDialog/SelectReportOptionView.tsx:132 +#: src/components/ReportDialog/SelectReportOptionView.tsx:135 msgid "View details for reporting a copyright violation" msgstr "" @@ -9902,7 +9941,7 @@ msgstr "" msgid "View full thread" msgstr "" -#: src/components/moderation/LabelsOnMe.tsx:46 +#: src/components/moderation/LabelsOnMe.tsx:51 msgid "View information about these labels" msgstr "" @@ -9925,8 +9964,8 @@ msgstr "" #: src/components/ProfileHoverCard/index.web.tsx:486 #: src/components/ProfileHoverCard/index.web.tsx:513 #: src/view/com/posts/PostFeedErrorMessage.tsx:179 -#: src/view/com/util/PostMeta.tsx:91 -#: src/view/com/util/PostMeta.tsx:128 +#: src/view/com/util/PostMeta.tsx:90 +#: src/view/com/util/PostMeta.tsx:127 msgid "View profile" msgstr "" @@ -9958,8 +9997,8 @@ msgstr "" msgid "View your default post interaction settings" msgstr "" -#: src/view/com/home/HomeHeaderLayout.web.tsx:56 -#: src/view/com/home/HomeHeaderLayoutMobile.tsx:71 +#: src/view/com/home/HomeHeaderLayout.web.tsx:57 +#: src/view/com/home/HomeHeaderLayoutMobile.tsx:72 msgid "View your feeds and explore more" msgstr "" @@ -9993,21 +10032,21 @@ msgstr "" msgid "Visit your notification settings" msgstr "" -#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx:81 +#: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VolumeControl.tsx:80 msgid "Volume" msgstr "" -#: src/components/moderation/LabelPreference.tsx:142 -#: src/lib/moderation/useLabelBehaviorDescription.ts:17 -#: src/lib/moderation/useLabelBehaviorDescription.ts:22 +#: src/components/moderation/LabelPreference.tsx:141 +#: src/lib/moderation/useLabelBehaviorDescription.ts:20 +#: src/lib/moderation/useLabelBehaviorDescription.ts:25 msgid "Warn" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:48 +#: src/lib/moderation/useLabelBehaviorDescription.ts:51 msgid "Warn content" msgstr "" -#: src/lib/moderation/useLabelBehaviorDescription.ts:46 +#: src/lib/moderation/useLabelBehaviorDescription.ts:49 msgid "Warn content and filter from feeds" msgstr "" @@ -10133,7 +10172,7 @@ msgstr "" msgid "We're sorry, but based on your device's location, you are currently located in a region where we cannot provide access at this time." msgstr "" -#: src/view/screens/ProfileList.tsx:117 +#: src/screens/ProfileList/index.tsx:87 msgid "We're sorry, but we were unable to resolve this list. If this persists, please contact the list creator, @{handleOrDid}." msgstr "" @@ -10149,7 +10188,7 @@ msgstr "" msgid "We're sorry! The post you are replying to has been deleted." msgstr "" -#: src/components/Lists.tsx:195 +#: src/components/Lists.tsx:194 #: src/view/screens/NotFound.tsx:50 msgid "We're sorry! We can't find the page you were looking for." msgstr "" @@ -10182,7 +10221,7 @@ msgstr "" msgid "Welcome back!" msgstr "" -#: src/components/NewskieDialog.tsx:103 +#: src/components/NewskieDialog.tsx:121 msgid "Welcome, friend!" msgstr "" @@ -10235,37 +10274,37 @@ msgstr "" msgid "Why are you appealing?" msgstr "" -#: src/components/ReportDialog/SelectReportOptionView.tsx:42 +#: src/components/ReportDialog/SelectReportOptionView.tsx:45 msgid "Why should this content be reviewed?" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:32 -#: src/components/ReportDialog/SelectReportOptionView.tsx:55 +#: src/components/ReportDialog/SelectReportOptionView.tsx:58 msgid "Why should this feed be reviewed?" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:26 -#: src/components/ReportDialog/SelectReportOptionView.tsx:52 +#: src/components/ReportDialog/SelectReportOptionView.tsx:55 msgid "Why should this list be reviewed?" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:44 -#: src/components/ReportDialog/SelectReportOptionView.tsx:61 +#: src/components/ReportDialog/SelectReportOptionView.tsx:64 msgid "Why should this message be reviewed?" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:20 -#: src/components/ReportDialog/SelectReportOptionView.tsx:49 +#: src/components/ReportDialog/SelectReportOptionView.tsx:52 msgid "Why should this post be reviewed?" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:38 -#: src/components/ReportDialog/SelectReportOptionView.tsx:58 +#: src/components/ReportDialog/SelectReportOptionView.tsx:61 msgid "Why should this starter pack be reviewed?" msgstr "" #: src/components/moderation/ReportDialog/copy.ts:14 -#: src/components/ReportDialog/SelectReportOptionView.tsx:46 +#: src/components/ReportDialog/SelectReportOptionView.tsx:49 msgid "Why should this user be reviewed?" msgstr "" @@ -10297,7 +10336,7 @@ msgstr "" msgid "www.mylivestream.tv" msgstr "" -#: src/view/com/composer/select-language/SuggestedLanguage.tsx:100 +#: src/view/com/composer/select-language/SuggestedLanguage.tsx:102 msgid "Yes" msgstr "" @@ -10326,7 +10365,7 @@ msgstr "" msgid "Yesterday" msgstr "" -#: src/components/NewskieDialog.tsx:43 +#: src/components/NewskieDialog.tsx:91 msgid "You" msgstr "" @@ -10448,7 +10487,7 @@ msgstr "" msgid "You do not have any followers." msgstr "" -#: src/screens/Profile/KnownFollowers.tsx:109 +#: src/screens/Profile/KnownFollowers.tsx:112 msgid "You don't follow any users who follow @{name}." msgstr "" @@ -10460,11 +10499,11 @@ msgstr "" msgid "You don't have any invite codes yet! We'll send you some when you've been on Bluesky for a little longer." msgstr "" -#: src/view/screens/SavedFeeds.tsx:145 +#: src/screens/SavedFeeds.tsx:149 msgid "You don't have any pinned feeds." msgstr "" -#: src/view/screens/SavedFeeds.tsx:185 +#: src/screens/SavedFeeds.tsx:191 msgid "You don't have any saved feeds." msgstr "" @@ -10530,7 +10569,7 @@ msgstr "" msgid "You have not muted any accounts yet. To mute an account, go to their profile and select \"Mute account\" from the menu on their account." msgstr "" -#: src/components/Lists.tsx:58 +#: src/components/Lists.tsx:57 msgid "You have reached the end" msgstr "" @@ -10595,7 +10634,7 @@ msgstr "" msgid "You must complete age assurance in order to access this screen." msgstr "" -#: src/components/StarterPack/QrCodeDialog.tsx:61 +#: src/components/StarterPack/QrCodeDialog.tsx:65 msgid "You must grant access to your photo library to save a QR code" msgstr "" @@ -10771,7 +10810,7 @@ msgstr "" msgid "Your birth date" msgstr "" -#: src/components/Post/Embed/VideoEmbed/index.web.tsx:224 +#: src/components/Post/Embed/VideoEmbed/index.web.tsx:223 msgid "Your browser does not support the video format. Please try a different browser." msgstr "" -- 2.51.2