From e3ed03635147ab17ffb9c8e66950bbca4ffc72da Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 30 May 2024 05:13:57 +0100 Subject: [PATCH] blergh --- src/view/com/post-thread/PostThread.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 1212f992da..123e5b8de5 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -1,12 +1,14 @@ import React, {useEffect, useRef} from 'react' import {useWindowDimensions, View} from 'react-native' -import {runOnJS} from 'react-native-reanimated' +import Animated, {runOnJS} from 'react-native-reanimated' import {AppBskyFeedDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {moderatePost_wrapped as moderatePost} from '#/lib/moderatePost_wrapped' import {ScrollProvider} from '#/lib/ScrollContext' +import { useMinimalShellMode } from '#/lib/hooks/useMinimalShellMode' +import { MainScrollProvider } from '../util/MainScrollProvider' import {isAndroid, isNative, isWeb} from '#/platform/detection' import {useModerationOpts} from '#/state/preferences/moderation-opts' import { @@ -254,6 +256,8 @@ export function PostThread({ return arr }, [skeleton, deferParents, maxParents, maxReplies]) + const {headerMinimalShellTransform} = useMinimalShellMode() + // This is only used on the web to keep the post in view when its parents load. // On native, we rely on `maintainVisibleContentPosition` instead. const didAdjustScrollWeb = useRef(false) @@ -422,13 +426,15 @@ export function PostThread({ return ( {showHeader && ( - + + + )} - + - + ) }