diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-07 13:14:36 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-04-07 13:14:36 -0400 |
commit | f36ce8993d45ed69845a2ff6340f4d52d03855d9 (patch) | |
tree | 2c2acec3adfeda204c0b48eb7c7b22a7802780eb /src/components/profile/Content.tsx | |
parent | 4b0e55cd751bd77e05b8158177a74bd190974218 (diff) | |
parent | a3abb3abe322ea84306e1a12cec46972a81a37de (diff) |
Merge branch 'master' into chat-poc
# Conflicts:
# src/components/profile/Content.tsx
# src/components/taggs/TaggsBar.tsx
# src/screens/profile/ProfileScreen.tsx
# src/types/types.ts
Diffstat (limited to 'src/components/profile/Content.tsx')
-rw-r--r-- | src/components/profile/Content.tsx | 9 |
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, }} /> |