Unverified Commit 8ea18337 authored by Gerzon Z's avatar Gerzon Z Committed by GitHub
Browse files

[FIX] Audio thumb's size (#3945)

* update: Audio component
parent 9a17ce91
import React from 'react';
import { Easing, StyleProp, StyleSheet, Text, TextStyle, View } from 'react-native';
import { StyleProp, StyleSheet, Text, TextStyle, View } from 'react-native';
import { Audio } from 'expo-av';
import Slider from '@react-native-community/slider';
import moment from 'moment';
......@@ -84,12 +84,6 @@ const formatTime = (seconds: number) => moment.utc(seconds * 1000).format('mm:ss
const BUTTON_HIT_SLOP = { top: 12, right: 12, bottom: 12, left: 12 };
const sliderAnimationConfig = {
duration: 250,
easing: Easing.linear,
delay: 0
};
const Button = React.memo(({ loading, paused, onPress, disabled, theme }: IButton) => (
<Touchable
style={styles.playPauseButton}
......@@ -285,10 +279,7 @@ class MessageAudio extends React.Component<IMessageAudioProps, IMessageAudioStat
value={currentTime}
maximumValue={duration}
minimumValue={0}
// @ts-ignore
animateTransitions
animationConfig={sliderAnimationConfig}
thumbTintColor={isReply ? themes[theme].tintDisabled : isAndroid && themes[theme].tintColor}
thumbTintColor={isReply && isAndroid ? themes[theme].tintDisabled : isAndroid && themes[theme].tintColor}
minimumTrackTintColor={themes[theme].tintColor}
maximumTrackTintColor={themes[theme].auxiliaryText}
onValueChange={this.onValueChange}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment