Skip to content

Commit

Permalink
[FIX] Audio thumb's size (RocketChat#3945)
Browse files Browse the repository at this point in the history
* update: Audio component
  • Loading branch information
gerzonc authored Mar 23, 2022
1 parent f6ca33e commit 7bb3634
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions app/containers/message/Audio.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
Loading

0 comments on commit 7bb3634

Please sign in to comment.