Authored by shangjf

优化站内信列表点击效果 review by 陈琳

@@ -130,6 +130,10 @@ export default class MessageList extends Component { @@ -130,6 +130,10 @@ export default class MessageList extends Component {
130 onLongPressListItem={(itemData) =>{ 130 onLongPressListItem={(itemData) =>{
131 this.onLongPressListItem(itemData, rowID); 131 this.onLongPressListItem(itemData, rowID);
132 }} 132 }}
  133 + onPressListItem={(itemData) =>{
  134 + this.setState({showToolTips: false});
  135 + }
  136 + }
133 /> 137 />
134 ); 138 );
135 } 139 }
@@ -189,7 +193,7 @@ export default class MessageList extends Component { @@ -189,7 +193,7 @@ export default class MessageList extends Component {
189 render() { 193 render() {
190 let {isFetching, endReached, list, listId, shouldShowEmpty} = this.props.data; 194 let {isFetching, endReached, list, listId, shouldShowEmpty} = this.props.data;
191 let isLoadingMore = list.size != 0 && isFetching; 195 let isLoadingMore = list.size != 0 && isFetching;
192 - 196 +
193 if (shouldShowEmpty) { 197 if (shouldShowEmpty) {
194 return ( 198 return (
195 <View style={styles.container}> 199 <View style={styles.container}>
@@ -33,6 +33,9 @@ export default class MessageListBigIconCell extends Component { @@ -33,6 +33,9 @@ export default class MessageListBigIconCell extends Component {
33 onLongPress={() =>{ 33 onLongPress={() =>{
34 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData); 34 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
35 }} 35 }}
  36 + onPress={() =>{
  37 + this.props.onPressListItem && this.props.onPressListItem(itemData);
  38 + }}
36 > 39 >
37 <View style={styles.titleContainer}> 40 <View style={styles.titleContainer}>
38 <Text 41 <Text
@@ -31,6 +31,9 @@ export default class MessageListOrderCell extends Component { @@ -31,6 +31,9 @@ export default class MessageListOrderCell extends Component {
31 onLongPress={() =>{ 31 onLongPress={() =>{
32 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData); 32 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
33 }} 33 }}
  34 + onPress={() =>{
  35 + this.props.onPressListItem && this.props.onPressListItem(itemData);
  36 + }}
34 > 37 >
35 <View style={styles.contentContainer}> 38 <View style={styles.contentContainer}>
36 <Text 39 <Text
@@ -26,7 +26,7 @@ export default class MessageListSmallIconCell extends Component { @@ -26,7 +26,7 @@ export default class MessageListSmallIconCell extends Component {
26 let imageUri = body ? body.get('img_url','www.yohobuy.com') : 'www.yohobuy.com'; 26 let imageUri = body ? body.get('img_url','www.yohobuy.com') : 'www.yohobuy.com';
27 let content = body ? body.get('content','') : ''; 27 let content = body ? body.get('content','') : '';
28 imageUri = SlicedImage.getSlicedUrl(imageUri, 50, 50, 2); 28 imageUri = SlicedImage.getSlicedUrl(imageUri, 50, 50, 2);
29 - 29 +
30 return( 30 return(
31 <View style={styles.container}> 31 <View style={styles.container}>
32 <TouchableOpacity 32 <TouchableOpacity
@@ -34,6 +34,9 @@ export default class MessageListSmallIconCell extends Component { @@ -34,6 +34,9 @@ export default class MessageListSmallIconCell extends Component {
34 onLongPress={() =>{ 34 onLongPress={() =>{
35 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData); 35 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
36 }} 36 }}
  37 + onPress={() =>{
  38 + this.props.onPressListItem && this.props.onPressListItem(itemData);
  39 + }}
37 > 40 >
38 <View style={styles.contentContainer}> 41 <View style={styles.contentContainer}>
39 <Text 42 <Text
@@ -26,6 +26,9 @@ export default class MessageListTextCell extends Component { @@ -26,6 +26,9 @@ export default class MessageListTextCell extends Component {
26 onLongPress={() =>{ 26 onLongPress={() =>{
27 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData); 27 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
28 }} 28 }}
  29 + onPress={() =>{
  30 + this.props.onPressListItem && this.props.onPressListItem(itemData);
  31 + }}
29 > 32 >
30 <View style={styles.container}> 33 <View style={styles.container}>
31 <Text 34 <Text