aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/moments/MomentUploadProgressBar.tsx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/moments/MomentUploadProgressBar.tsx b/src/components/moments/MomentUploadProgressBar.tsx
index 26c20a46..285f4e84 100644
--- a/src/components/moments/MomentUploadProgressBar.tsx
+++ b/src/components/moments/MomentUploadProgressBar.tsx
@@ -5,6 +5,7 @@ import {Easing, useSharedValue, withTiming} from 'react-native-reanimated';
import {SafeAreaView} from 'react-native-safe-area-context';
import {useSelector} from 'react-redux';
import {RootState} from '../../store/rootReducer';
+import {MomentUploadStatusType} from '../../types';
import {normalize, SCREEN_WIDTH, StatusBarHeight} from '../../utils';
import {GradientProgressBar} from '../common';
@@ -16,11 +17,13 @@ const MomentUploadProgressBar: React.FC<MomentUploadProgressBarProps> =
const progress = useSharedValue(0);
useEffect(() => {
- progress.value = withTiming(1, {
- duration: 5000,
- easing: Easing.linear,
- });
- }, []);
+ if (momentUploadStatus === MomentUploadStatusType.Uploading) {
+ progress.value = withTiming(1, {
+ duration: 30 * 1000,
+ easing: Easing.out(Easing.quad),
+ });
+ }
+ }, [momentUploadStatus]);
return (
<View style={styles.background}>