Skip to content

Commit

Permalink
[#19351] fix: use animation worklet
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen-ghafouri committed Apr 4, 2024
1 parent 0129441 commit 16ba877
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/js/worklets/profile_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useAnimatedStyle, withTiming } from 'react-native-reanimated';

export function profileHeaderAnimation(scrollY, threshold, topBarHeight) {
return useAnimatedStyle(() => {
'worklet';
const opacity = scrollY.value < threshold ? withTiming(0) : withTiming(1);
const translateY = scrollY.value < threshold ? withTiming(topBarHeight) : withTiming(0);

Expand Down
1 change: 1 addition & 0 deletions src/mocks/js_dependencies.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@
"../src/js/worklets/chat/messenger/composer.js" #js {}
"../src/js/worklets/chat/messenger/placeholder.js" #js {}
"../src/js/worklets/parallax.js" #js {}
"../src/js/worklets/profile_header.js" #js {}
"../src/js/worklets/identifiers_highlighting.js" #js {}
"./fleets.js" default-fleets
"../translations/ar.json" (js/JSON.parse (slurp "./translations/ar.json"))
Expand Down

0 comments on commit 16ba877

Please sign in to comment.