We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
withRepeat
1 parent 45bb247 commit 12b4a25Copy full SHA for 12b4a25
src/view/com/composer/Composer.tsx
@@ -27,6 +27,7 @@ import Animated, {
27
useAnimatedStyle,
28
useDerivedValue,
29
useSharedValue,
30
+ withRepeat,
31
withTiming,
32
} from 'react-native-reanimated'
33
import {useSafeAreaInsets} from 'react-native-safe-area-context'
@@ -1089,10 +1090,13 @@ function VideoUploadToolbar({state}: {state: VideoUploadState}) {
1089
1090
1091
const rotate = useDerivedValue(() => {
1092
if (progress === 0 || progress >= 0.99) {
- return withTiming(360, {
1093
- duration: 2500,
1094
- easing: Easing.out(Easing.cubic),
1095
- })
+ return withRepeat(
+ withTiming(360, {
+ duration: 2500,
1096
+ easing: Easing.out(Easing.cubic),
1097
+ }),
1098
+ -1,
1099
+ )
1100
}
1101
return 0
1102
})
0 commit comments