...
|
...
|
@@ -45,6 +45,7 @@ export default class ListCell extends React.Component { |
|
|
commentCount: React.PropTypes.number,
|
|
|
likeCount: React.PropTypes.number,
|
|
|
}),
|
|
|
hideSection: React.PropTypes.bool,
|
|
|
onPressPost: React.PropTypes.func,
|
|
|
onPressAvatar: React.PropTypes.func,
|
|
|
onPressSectionTag: React.PropTypes.func,
|
...
|
...
|
@@ -61,7 +62,8 @@ export default class ListCell extends React.Component { |
|
|
let data = this.props.data.toJS();
|
|
|
let {author, timeago, isOwner, isTop, isLike, id, title, desc, thumbs, section, commentCount, likeCount} = data;
|
|
|
let likeImage = isLike ? require('../../images/home/like.png') : require('../../images/home/unlike.png');
|
|
|
|
|
|
let hideSection = this.props.hideSection;
|
|
|
let bottomStyle = hideSection ? {alignSelf: 'flex-end'} : null;
|
|
|
return (
|
|
|
<TouchableOpacity
|
|
|
style={styles.row}
|
...
|
...
|
@@ -85,13 +87,14 @@ export default class ListCell extends React.Component { |
|
|
{title ? <Text style={styles.title} numberOfLines={2}>{title}</Text> : null}
|
|
|
{desc ? <Text style={styles.desc} numberOfLines={2}>{desc}</Text> : null}
|
|
|
{thumbs.length > 0 ? <Thumbs style={styles.thumbs} data={thumbs}/> : null}
|
|
|
<View style={styles.bottom}>
|
|
|
<SectionItem
|
|
|
<View style={[styles.bottom, bottomStyle]}>
|
|
|
{hideSection ? null : <SectionItem
|
|
|
name={section.name}
|
|
|
onPressSection={() => {
|
|
|
this.props.onPressSectionTag && this.props.onPressSectionTag(section);
|
|
|
}}
|
|
|
/>
|
|
|
/>}
|
|
|
|
|
|
<View style={styles.buttonContainer}>
|
|
|
<NumberButton
|
|
|
source={require('../../images/home/mes.png')}
|
...
|
...
|
|