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