diff options
Diffstat (limited to 'src/view/screens/ProfileList.tsx')
-rw-r--r-- | src/view/screens/ProfileList.tsx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index f50c6afb3..923560efd 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -54,7 +54,7 @@ import { import {cleanError} from '#/lib/strings/errors' import {useSession} from '#/state/session' import {useComposerControls} from '#/state/shell/composer' -import {isWeb} from '#/platform/detection' +import {isNative, isWeb} from '#/platform/detection' import {truncateAndInvalidate} from '#/state/queries/util' import { usePreferencesQuery, @@ -563,7 +563,10 @@ const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>( const [hasNew, setHasNew] = React.useState(false) const onScrollToTop = useCallback(() => { - scrollElRef.current?.scrollToOffset({offset: -headerHeight}) + scrollElRef.current?.scrollToOffset({ + animated: isNative, + offset: -headerHeight, + }) queryClient.resetQueries({queryKey: FEED_RQKEY(feed)}) setHasNew(false) }, [scrollElRef, headerHeight, queryClient, feed, setHasNew]) @@ -633,7 +636,10 @@ const AboutSection = React.forwardRef<SectionRef, AboutSectionProps>( ) const onScrollToTop = useCallback(() => { - scrollElRef.current?.scrollToOffset({offset: -headerHeight}) + scrollElRef.current?.scrollToOffset({ + animated: isNative, + offset: -headerHeight, + }) }, [scrollElRef, headerHeight]) React.useImperativeHandle(ref, () => ({ |