???
This commit is contained in:
parent
cfd90b14f9
commit
bb5978444c
|
@ -120,24 +120,13 @@ export default class RoomItem extends React.PureComponent {
|
|||
|
||||
render() {
|
||||
const { unread, name, _updatedAt } = this.props;
|
||||
if (_updatedAt) {
|
||||
return (
|
||||
<TouchableOpacity onPress={this.props.onPress} style={styles.container}>
|
||||
{this.icon}
|
||||
<View style={styles.roomNameView}>
|
||||
<Text style={styles.roomName} ellipsizeMode='tail' numberOfLines={1}>{ name }</Text>
|
||||
<Text style={styles.update} ellipsizeMode='tail' numberOfLines={1}>{ moment(_updatedAt).format(this.props.dateFormat) }</Text>
|
||||
</View>
|
||||
{this.renderNumber(unread)}
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<TouchableOpacity onPress={this.props.onPress} style={styles.container}>
|
||||
{this.icon}
|
||||
<View style={styles.roomNameView}>
|
||||
<Text style={styles.roomName} ellipsizeMode='tail' numberOfLines={1}>{ name }</Text>
|
||||
{_updatedAt ? <Text style={styles.update} ellipsizeMode='tail' numberOfLines={1}>{ moment(_updatedAt).format(this.props.dateFormat) }</Text> : null}
|
||||
</View>
|
||||
{this.renderNumber(unread)}
|
||||
</TouchableOpacity>
|
||||
|
|
Loading…
Reference in New Issue