...
|
...
|
@@ -4,9 +4,7 @@ import React from 'react'; |
|
|
import ReactNative from 'react-native';
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
import SectionItem from '../home/SectionItem';
|
|
|
// import Thumbs from './Thumbs';
|
|
|
// import SectionItem from './SectionItem';
|
|
|
// import NumberButton from './NumberButton';
|
|
|
|
|
|
const {
|
|
|
View,
|
|
|
Text,
|
...
|
...
|
@@ -47,14 +45,17 @@ export default class ReplyCell extends React.Component { |
|
|
|
|
|
render() {
|
|
|
let data = this.props.data.toJS();
|
|
|
let {user, title, timeago, post, subTitle} = data;
|
|
|
let {user, title, timeago, post, subTitle, contentType} = data;
|
|
|
let postId = post.id;
|
|
|
let subTitleStyle = contentType == 1 ? null : {marginBottom: 15};
|
|
|
return (
|
|
|
|
|
|
<TouchableOpacity
|
|
|
activeOpacity={0.8}
|
|
|
activeOpacity={contentType == 1 ? 0.8 : 1}
|
|
|
onPress={() => {
|
|
|
this.props.onPressPost && this.props.onPressPost(postId);
|
|
|
if (contentType == 1) {
|
|
|
this.props.onPressPost && this.props.onPressPost(postId);
|
|
|
}
|
|
|
}}
|
|
|
>
|
|
|
<View style={styles.container}>
|
...
|
...
|
@@ -66,13 +67,13 @@ export default class ReplyCell extends React.Component { |
|
|
|
|
|
</View>
|
|
|
|
|
|
<View style={styles.middleContainer}>
|
|
|
<View style={[styles.middleContainer, subTitleStyle]}>
|
|
|
<Text style={styles.content}
|
|
|
numberOfLines={2}
|
|
|
>{subTitle}</Text>
|
|
|
</View>
|
|
|
|
|
|
<View style={styles.bottomContainer}>
|
|
|
{contentType == 1 ? <View style={styles.bottomContainer}>
|
|
|
<Image
|
|
|
defaultSource={require('../../images/message/duihuakuang.png')}
|
|
|
style={styles.bubble}
|
...
|
...
|
@@ -93,7 +94,7 @@ export default class ReplyCell extends React.Component { |
|
|
/>
|
|
|
</View>
|
|
|
|
|
|
</View>
|
|
|
</View> : null}
|
|
|
|
|
|
</View>
|
|
|
|
...
|
...
|
@@ -107,22 +108,13 @@ export default class ReplyCell extends React.Component { |
|
|
|
|
|
let styles = StyleSheet.create({
|
|
|
container: {
|
|
|
// flex:1,
|
|
|
// backgroundColor:'green',
|
|
|
flexDirection:'column',
|
|
|
// justifyContent:'center',
|
|
|
// alignItems:'center',
|
|
|
// height: 60,
|
|
|
// backgroundColor: 'yellow',
|
|
|
},
|
|
|
|
|
|
topContainer: {
|
|
|
// width: 60,
|
|
|
height: 60,
|
|
|
flexDirection: 'row',
|
|
|
padding: 15,
|
|
|
// justifyContent: 'center',
|
|
|
// backgroundColor:'yellow',
|
|
|
},
|
|
|
|
|
|
topRight: {
|
...
|
...
|
@@ -132,22 +124,17 @@ let styles = StyleSheet.create({ |
|
|
},
|
|
|
|
|
|
name: {
|
|
|
// marginTop: 13,
|
|
|
fontFamily: 'Helvetica Light',
|
|
|
fontSize: 15,
|
|
|
// backgroundColor:'red',
|
|
|
},
|
|
|
|
|
|
timeago: {
|
|
|
fontFamily: 'Helvetica Light',
|
|
|
fontSize: 10,
|
|
|
// marginLeft:15,
|
|
|
color: '#b0b0b0',
|
|
|
// backgroundColor:'red',
|
|
|
},
|
|
|
|
|
|
middleContainer: {
|
|
|
// flex: 1,
|
|
|
backgroundColor:'white',
|
|
|
},
|
|
|
|
...
|
...
|
@@ -156,50 +143,35 @@ let styles = StyleSheet.create({ |
|
|
marginRight: 15,
|
|
|
fontFamily: 'Helvetica Light',
|
|
|
fontSize: 14,
|
|
|
// backgroundColor:'red',
|
|
|
// height: 60,
|
|
|
},
|
|
|
|
|
|
bottomContainer: {
|
|
|
|
|
|
// flex:1,
|
|
|
// backgroundColor:'yellow',
|
|
|
height: 90,
|
|
|
// margin: 15,
|
|
|
marginLeft: 15,
|
|
|
marginRight: 15,
|
|
|
marginTop:0,
|
|
|
// marginBottom:15,
|
|
|
// padding: 15,
|
|
|
marginTop: 0,
|
|
|
},
|
|
|
|
|
|
bubble: {
|
|
|
// flex:1,
|
|
|
backgroundColor:'white',
|
|
|
flexDirection:'row',
|
|
|
// justifyContent: 'center',
|
|
|
alignItems:'center',
|
|
|
height:40,
|
|
|
padding:10,
|
|
|
height: 40,
|
|
|
padding: 10,
|
|
|
},
|
|
|
|
|
|
|
|
|
reply: {
|
|
|
// flex:1,
|
|
|
backgroundColor: 'transparent',
|
|
|
fontFamily: 'Helvetica Light',
|
|
|
fontSize: 12,
|
|
|
color: '#8b8b8b',
|
|
|
marginTop:8,
|
|
|
|
|
|
marginTop: 8,
|
|
|
},
|
|
|
|
|
|
section: {
|
|
|
flexDirection: 'row',
|
|
|
justifyContent: 'space-between',
|
|
|
marginTop: 15,
|
|
|
// backgroundColor:'red',
|
|
|
// marginBottom: 15,
|
|
|
},
|
|
|
|
|
|
|
...
|
...
|
|