diff --git a/modules/expo-scroll-forwarder/src/ExpoScrollForwarder.types.ts b/modules/expo-scroll-forwarder/src/ExpoScrollForwarder.types.ts index 26b9e7553a..3f1e4a63da 100644 --- a/modules/expo-scroll-forwarder/src/ExpoScrollForwarder.types.ts +++ b/modules/expo-scroll-forwarder/src/ExpoScrollForwarder.types.ts @@ -1,5 +1,3 @@ -import React from 'react' - export interface ExpoScrollForwarderViewProps { scrollViewTag: number | null children: React.ReactNode diff --git a/modules/expo-scroll-forwarder/src/ExpoScrollForwarderView.ios.tsx b/modules/expo-scroll-forwarder/src/ExpoScrollForwarderView.ios.tsx index 21a2b9fb26..18bdb25c8a 100644 --- a/modules/expo-scroll-forwarder/src/ExpoScrollForwarderView.ios.tsx +++ b/modules/expo-scroll-forwarder/src/ExpoScrollForwarderView.ios.tsx @@ -1,7 +1,6 @@ -import * as React from 'react' import {requireNativeViewManager} from 'expo-modules-core' -import {ExpoScrollForwarderViewProps} from './ExpoScrollForwarder.types' +import {type ExpoScrollForwarderViewProps} from './ExpoScrollForwarder.types' const NativeView: React.ComponentType = requireNativeViewManager('ExpoScrollForwarder') diff --git a/modules/expo-scroll-forwarder/src/ExpoScrollForwarderView.tsx b/modules/expo-scroll-forwarder/src/ExpoScrollForwarderView.tsx index 0f5d01c130..d66eef7cbd 100644 --- a/modules/expo-scroll-forwarder/src/ExpoScrollForwarderView.tsx +++ b/modules/expo-scroll-forwarder/src/ExpoScrollForwarderView.tsx @@ -1,6 +1,4 @@ -import React from 'react' - -import {ExpoScrollForwarderViewProps} from './ExpoScrollForwarder.types' +import {type ExpoScrollForwarderViewProps} from './ExpoScrollForwarder.types' export function ExpoScrollForwarderView({ children, diff --git a/src/components/StarterPack/ProfileStarterPacks.tsx b/src/components/StarterPack/ProfileStarterPacks.tsx index d567895066..d7afa37d25 100644 --- a/src/components/StarterPack/ProfileStarterPacks.tsx +++ b/src/components/StarterPack/ProfileStarterPacks.tsx @@ -23,6 +23,7 @@ import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import {type NavigationProp} from '#/lib/routes/types' import {parseStarterPackUri} from '#/lib/strings/starter-pack' import {logger} from '#/logger' +import {isIOS} from '#/platform/detection' import {useActorStarterPacksQuery} from '#/state/queries/actor-starter-packs' import {List, type ListRef} from '#/view/com/util/List' import {FeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' @@ -111,7 +112,7 @@ export const ProfileStarterPacks = React.forwardRef< }, [isFetchingNextPage, hasNextPage, isError, fetchNextPage]) useEffect(() => { - if (enabled && scrollElRef.current) { + if (isIOS && enabled && scrollElRef.current) { const nativeTag = findNodeHandle(scrollElRef.current) setScrollViewTag(nativeTag) } diff --git a/src/screens/Profile/Sections/Feed.tsx b/src/screens/Profile/Sections/Feed.tsx index 007f9ea8f8..e0c3e221f4 100644 --- a/src/screens/Profile/Sections/Feed.tsx +++ b/src/screens/Profile/Sections/Feed.tsx @@ -5,7 +5,7 @@ import {useLingui} from '@lingui/react' import {useQueryClient} from '@tanstack/react-query' import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' -import {isNative} from '#/platform/detection' +import {isIOS, isNative} from '#/platform/detection' import {type FeedDescriptor} from '#/state/queries/post-feed' import {RQKEY as FEED_RQKEY} from '#/state/queries/post-feed' import {truncateAndInvalidate} from '#/state/queries/util' @@ -67,7 +67,7 @@ export const ProfileFeedSection = React.forwardRef< }, [_]) React.useEffect(() => { - if (isFocused && scrollElRef.current) { + if (isIOS && isFocused && scrollElRef.current) { const nativeTag = findNodeHandle(scrollElRef.current) setScrollViewTag(nativeTag) } diff --git a/src/screens/Profile/Sections/Labels.tsx b/src/screens/Profile/Sections/Labels.tsx index b7f702f116..c04c047c4a 100644 --- a/src/screens/Profile/Sections/Labels.tsx +++ b/src/screens/Profile/Sections/Labels.tsx @@ -14,7 +14,7 @@ import {useLingui} from '@lingui/react' import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED' import {isLabelerSubscribed, lookupLabelValueDefinition} from '#/lib/moderation' import {useScrollHandlers} from '#/lib/ScrollContext' -import {isNative} from '#/platform/detection' +import {isIOS, isNative} from '#/platform/detection' import {type ListRef} from '#/view/com/util/List' import {atoms as a, useTheme} from '#/alf' import {Divider} from '#/components/Divider' @@ -92,7 +92,7 @@ export const ProfileLabelsSection = React.forwardRef< })) React.useEffect(() => { - if (isFocused && scrollElRef.current) { + if (isIOS && isFocused && scrollElRef.current) { const nativeTag = findNodeHandle(scrollElRef.current) setScrollViewTag(nativeTag) } diff --git a/src/view/com/feeds/ProfileFeedgens.tsx b/src/view/com/feeds/ProfileFeedgens.tsx index 2bf95de483..76b57d0eed 100644 --- a/src/view/com/feeds/ProfileFeedgens.tsx +++ b/src/view/com/feeds/ProfileFeedgens.tsx @@ -12,7 +12,7 @@ import {useQueryClient} from '@tanstack/react-query' import {cleanError} from '#/lib/strings/errors' import {logger} from '#/logger' -import {isNative, isWeb} from '#/platform/detection' +import {isIOS, isNative, isWeb} from '#/platform/detection' import {usePreferencesQuery} from '#/state/queries/preferences' import {RQKEY, useProfileFeedgensQuery} from '#/state/queries/profile-feedgens' import {EmptyState} from '#/view/com/util/EmptyState' @@ -175,7 +175,7 @@ export const ProfileFeedgens = React.forwardRef< ) React.useEffect(() => { - if (enabled && scrollElRef.current) { + if (isIOS && enabled && scrollElRef.current) { const nativeTag = findNodeHandle(scrollElRef.current) setScrollViewTag(nativeTag) } diff --git a/src/view/com/lists/ProfileLists.tsx b/src/view/com/lists/ProfileLists.tsx index 437648c62a..e264bd6c64 100644 --- a/src/view/com/lists/ProfileLists.tsx +++ b/src/view/com/lists/ProfileLists.tsx @@ -12,7 +12,7 @@ import {useQueryClient} from '@tanstack/react-query' import {cleanError} from '#/lib/strings/errors' import {logger} from '#/logger' -import {isNative, isWeb} from '#/platform/detection' +import {isIOS, isNative, isWeb} from '#/platform/detection' import {RQKEY, useProfileListsQuery} from '#/state/queries/profile-lists' import {EmptyState} from '#/view/com/util/EmptyState' import {ErrorMessage} from '#/view/com/util/error/ErrorMessage' @@ -171,7 +171,7 @@ export const ProfileLists = React.forwardRef( ) React.useEffect(() => { - if (enabled && scrollElRef.current) { + if (isIOS && enabled && scrollElRef.current) { const nativeTag = findNodeHandle(scrollElRef.current) setScrollViewTag(nativeTag) }