Skip to content

Commit

Permalink
Fix some layout jank in the PagerWithHeader on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed Nov 1, 2023
1 parent db519a0 commit 4ce013b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/view/com/pager/PagerWithHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ export const PagerWithHeader = React.forwardRef<PagerRef, PagerWithHeaderProps>(
() => ({
transform: [
{
translateY:
translateY: Math.min(
Math.min(scrollY.value, headerHeight - tabBarHeight) * -1,
0,
),
},
],
}),
Expand Down
6 changes: 5 additions & 1 deletion src/view/screens/ProfileList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export const ProfileListScreenInner = observer(
</View>
)
}
return null
return <Header rkey={rkey} list={list} />
},
)

Expand Down Expand Up @@ -672,6 +672,9 @@ const AboutSection = React.forwardRef<SectionRef, AboutSectionProps>(
}))

const renderHeader = React.useCallback(() => {
if (!list.data) {
return null
}
return (
<View>
<View
Expand Down Expand Up @@ -743,6 +746,7 @@ const AboutSection = React.forwardRef<SectionRef, AboutSectionProps>(
)
}, [
pal,
list.data,
isMobile,
descriptionRT,
creator,
Expand Down

0 comments on commit 4ce013b

Please sign in to comment.