aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/Content.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/profile/Content.tsx')
-rw-r--r--src/components/profile/Content.tsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx
index dd68ab17..05098d14 100644
--- a/src/components/profile/Content.tsx
+++ b/src/components/profile/Content.tsx
@@ -67,6 +67,8 @@ const Content: React.FC<ContentProps> = ({userXId, screenType}) => {
*/
const [isBlocked, setIsBlocked] = useState<boolean>(false);
const [profileBodyHeight, setProfileBodyHeight] = useState(0);
+ const [socialsBarHeight, setSocialsBarHeight] = useState(0);
+ const [shouldBounce, setShouldBounce] = useState<boolean>(true);
const [refreshing, setRefreshing] = useState<boolean>(false);
const onRefresh = useCallback(() => {
@@ -88,6 +90,11 @@ const Content: React.FC<ContentProps> = ({userXId, screenType}) => {
setProfileBodyHeight(height);
};
+ const onSocialsBarLayout = (e: LayoutChangeEvent) => {
+ const {height} = e.nativeEvent.layout;
+ setSocialsBarHeight(height);
+ };
+
useEffect(() => {
const isActuallyBlocked = blockedUsers.some(
(cur_user) => user.username === cur_user.username,
@@ -152,6 +159,7 @@ const Content: React.FC<ContentProps> = ({userXId, screenType}) => {
/>
<TaggsBar
{...{y, profileBodyHeight, userXId, screenType}}
+ onLayout={onSocialsBarLayout}
/>
{canViewProfile(state, userXId, screenType) ? (
<PublicProfile
@@ -161,6 +169,7 @@ const Content: React.FC<ContentProps> = ({userXId, screenType}) => {
screenType,
setScrollEnabled,
profileBodyHeight,
+ socialsBarHeight,
scrollViewRef,
}}
/>