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

* update: Audio component
This commit is contained in:
Gerzon Z 2022-03-23 10:49:45 -04:00 committed by GitHub
parent 9a17ce91a8
commit 8ea183373e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 12 deletions

View File

@ -1,5 +1,5 @@
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}

File diff suppressed because one or more lines are too long