...
|
...
|
@@ -11,6 +11,7 @@ import ReactNative, { |
|
|
TouchableOpacity,
|
|
|
InteractionManager,
|
|
|
Platform,
|
|
|
RefreshControl,
|
|
|
} from 'react-native';
|
|
|
|
|
|
import MessageCell from './MessageCell';
|
...
|
...
|
@@ -61,6 +62,9 @@ export default class Message extends Component { |
|
|
let isPullToRefresh = latest.isFetching;
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
|
|
|
{
|
|
|
Platform.OS === 'ios' ?
|
|
|
<ListView
|
|
|
ref={(c) => {
|
|
|
this.listView = c;
|
...
|
...
|
@@ -76,6 +80,29 @@ export default class Message extends Component { |
|
|
this.props.onRefresh && this.props.onRefresh();
|
|
|
}}
|
|
|
/>
|
|
|
:
|
|
|
<ListView
|
|
|
ref={(c) => {
|
|
|
this.listView = c;
|
|
|
}}
|
|
|
contentContainerStyle={styles.contentContainer}
|
|
|
dataSource={this.dataSource.cloneWithRows(dataSource)}
|
|
|
renderRow={this.renderRow}
|
|
|
renderSeparator={this.renderSeparator}
|
|
|
enableEmptySections={true}
|
|
|
enablePullToRefresh={true}
|
|
|
refreshControl={
|
|
|
<RefreshControl
|
|
|
refreshing={false}
|
|
|
onRefresh={() => {
|
|
|
this.props.onRefresh && this.props.onRefresh();
|
|
|
}}
|
|
|
colors={['#000000', '#ff0000']}
|
|
|
progressBackgroundColor="#ffffff"
|
|
|
/>
|
|
|
}
|
|
|
/>
|
|
|
}
|
|
|
</View>
|
|
|
);
|
|
|
}
|
...
|
...
|
|