Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/containers/message/Audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class Audio extends React.Component {
onValueChange={this.onValueChange}
thumbImage={isIOS && { uri: 'audio_thumb', scale: Dimensions.get('window').scale }}
/>
<Text style={[styles.duration, { color: themes[theme].auxiliaryText }]}>{this.duration}</Text>
{paused ? <Text style={[styles.duration, { color: themes[theme].auxiliaryText }]}>{this.duration}</Text> : <Text style={[styles.duration, { color: themes[theme].auxiliaryText }]}>{formatTime(currentTime)}</Text>}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole <Text style={[styles.duration, { color: themes[theme].auxiliaryText }]}>...</Text> is repeated twice.
Why not creating a new variable and use it like this?

<Text style={[styles.duration, { color: themes[theme].auxiliaryText }]}>
    {newVariable}
</Text>

</View>
<Markdown msg={description} baseUrl={baseUrl} username={user.username} getCustomEmoji={getCustomEmoji} useMarkdown={useMarkdown} theme={theme} />
</>
Expand Down