Authored by chenl

Merge commit '07b58ce6' into 5.4

@@ -195,7 +195,7 @@ function parseCategoryBSubDetail(channel_id, category_id, subcategory_data, prop @@ -195,7 +195,7 @@ function parseCategoryBSubDetail(channel_id, category_id, subcategory_data, prop
195 }); 195 });
196 196
197 let more = { 197 let more = {
198 - show_category_name: 'more', 198 + show_category_name: 'MORE',
199 category_name: "全部" + (category ? category.get('category_name') : ''), 199 category_name: "全部" + (category ? category.get('category_name') : ''),
200 parent_id: category_id, 200 parent_id: category_id,
201 relation_parameter: category ? category.get('relation_parameter') : {}, 201 relation_parameter: category ? category.get('relation_parameter') : {},
@@ -11,6 +11,7 @@ import ReactNative, { @@ -11,6 +11,7 @@ import ReactNative, {
11 TouchableOpacity, 11 TouchableOpacity,
12 InteractionManager, 12 InteractionManager,
13 Platform, 13 Platform,
  14 + RefreshControl,
14 } from 'react-native'; 15 } from 'react-native';
15 16
16 import MessageCell from './MessageCell'; 17 import MessageCell from './MessageCell';
@@ -61,6 +62,9 @@ export default class Message extends Component { @@ -61,6 +62,9 @@ export default class Message extends Component {
61 let isPullToRefresh = latest.isFetching; 62 let isPullToRefresh = latest.isFetching;
62 return ( 63 return (
63 <View style={styles.container}> 64 <View style={styles.container}>
  65 +
  66 + {
  67 + Platform.OS === 'ios' ?
64 <ListView 68 <ListView
65 ref={(c) => { 69 ref={(c) => {
66 this.listView = c; 70 this.listView = c;
@@ -76,6 +80,29 @@ export default class Message extends Component { @@ -76,6 +80,29 @@ export default class Message extends Component {
76 this.props.onRefresh && this.props.onRefresh(); 80 this.props.onRefresh && this.props.onRefresh();
77 }} 81 }}
78 /> 82 />
  83 + :
  84 + <ListView
  85 + ref={(c) => {
  86 + this.listView = c;
  87 + }}
  88 + contentContainerStyle={styles.contentContainer}
  89 + dataSource={this.dataSource.cloneWithRows(dataSource)}
  90 + renderRow={this.renderRow}
  91 + renderSeparator={this.renderSeparator}
  92 + enableEmptySections={true}
  93 + enablePullToRefresh={true}
  94 + refreshControl={
  95 + <RefreshControl
  96 + refreshing={false}
  97 + onRefresh={() => {
  98 + this.props.onRefresh && this.props.onRefresh();
  99 + }}
  100 + colors={['#000000', '#ff0000']}
  101 + progressBackgroundColor="#ffffff"
  102 + />
  103 + }
  104 + />
  105 + }
79 </View> 106 </View>
80 ); 107 );
81 } 108 }
@@ -59,7 +59,9 @@ class MessageContainer extends Component { @@ -59,7 +59,9 @@ class MessageContainer extends Component {
59 } 59 }
60 60
61 onRefresh() { 61 onRefresh() {
  62 + InteractionManager.runAfterInteractions(() => {
62 this.props.actions.latestMessage(); 63 this.props.actions.latestMessage();
  64 + });
63 } 65 }
64 66
65 onPressListItem(item) { 67 onPressListItem(item) {