Skip to content

Commit

Permalink
chore: remove header animation height
Browse files Browse the repository at this point in the history
  • Loading branch information
r0b0t3d committed Dec 7, 2021
1 parent 42cb6c1 commit ce4db14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/components/header/CollapsibleHeaderContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import Animated, {
useAnimatedStyle,
useDerivedValue,
useSharedValue,
withTiming,
} from 'react-native-reanimated';
import useCollapsibleContext from '../../hooks/useCollapsibleContext';

Expand Down Expand Up @@ -44,9 +43,7 @@ export default function CollapsibleHeaderContainer({
layout: { height },
},
}: LayoutChangeEvent) => {
headerHeight.value = withTiming(height, {
duration: 200,
});
headerHeight.value = height;
handleHeaderContainerLayout(contentKey, height);
},
[contentKey, handleHeaderContainerLayout]
Expand Down
2 changes: 1 addition & 1 deletion src/withCollapsibleContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function withCollapsibleContext<T>(Component: FC<T>) {
0
);
headerHeight.value = withTiming(totalHeight, {
duration: fixedHeaderHeight.value === 0 ? 0 : 200,
duration: fixedHeaderHeight.value === 0 ? 0 : 10,
});
fixedHeaderHeight.value = totalHeight;
// Try refresh sticky positions
Expand Down

0 comments on commit ce4db14

Please sign in to comment.