Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RocketChat
Rocket.Chat.ReactNative
Commits
8ea18337
Unverified
Commit
8ea18337
authored
Mar 23, 2022
by
Gerzon Z
Committed by
GitHub
Mar 23, 2022
Browse files
[FIX] Audio thumb's size (#3945)
* update: Audio component
parent
9a17ce91
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
app/containers/message/Audio.tsx
View file @
8ea18337
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
}
...
...
storybook/stories/__snapshots__/Message.storyshot
View file @
8ea18337
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment