...
|
...
|
@@ -18,6 +18,7 @@ export default class ContentMessageView extends Component { |
|
|
|
|
|
this._renderRow = this._renderRow.bind(this);
|
|
|
this._renderHeader = this._renderHeader.bind(this);
|
|
|
this._renderFooter = this._renderFooter.bind(this);
|
|
|
this.dataSource = new ListView.DataSource({
|
|
|
rowHasChanged: (r1, r2) => !Immutable.is(r1, r2),
|
|
|
});
|
...
|
...
|
@@ -42,10 +43,6 @@ export default class ContentMessageView extends Component { |
|
|
NativeModules.YH_CommonHelper.jumpToUpdateNotificationStatus();
|
|
|
}
|
|
|
|
|
|
function onPress(actionUrl) {
|
|
|
NativeModules.YH_CommonHelper.jumpWithUrl(actionUrl);
|
|
|
}
|
|
|
|
|
|
return (<View>
|
|
|
{showStatus ?
|
|
|
<View style={styles.tipContainer}>
|
...
|
...
|
@@ -62,7 +59,7 @@ export default class ContentMessageView extends Component { |
|
|
<View style={styles.tabContainer}>
|
|
|
{this.props.tabButtons.map((button, index)=> {
|
|
|
return <TouchableOpacity style={styles.tabItemContainer} key={index} onPress={()=> {
|
|
|
onPress(button.actionUrl)
|
|
|
this.props.onPressTabAction && this.props.onPressTabAction(button.actionUrl, button.type);
|
|
|
}}>
|
|
|
<ContentMessageTabView icon={button.icon} title={button.description} badge={button.unReadCount}/>
|
|
|
</TouchableOpacity>
|
...
|
...
|
@@ -73,6 +70,13 @@ export default class ContentMessageView extends Component { |
|
|
)
|
|
|
}
|
|
|
|
|
|
_renderFooter(){
|
|
|
return (
|
|
|
<View style={[{height: 50}, {backgroundColor: 'white'}, {justifyContent:'center'}]}>
|
|
|
</View>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
let commentList = this.props.commentList;
|
|
|
let isPullToRefresh = this.props.isPullToRefresh;
|
...
|
...
|
@@ -91,6 +95,7 @@ export default class ContentMessageView extends Component { |
|
|
dataSource={this.dataSource.cloneWithRows(commentList)}
|
|
|
renderRow={this._renderRow}
|
|
|
renderHeader={this._renderHeader}
|
|
|
renderFooter={this._renderFooter}
|
|
|
enableEmptySections={true}
|
|
|
enablePullToRefresh={true}
|
|
|
isOnPullToRefresh={isPullToRefresh}
|
...
|
...
|
@@ -112,6 +117,7 @@ export default class ContentMessageView extends Component { |
|
|
dataSource={this.dataSource.cloneWithRows(commentList)}
|
|
|
renderRow={this._renderRow}
|
|
|
renderHeader={this._renderHeader}
|
|
|
renderFooter={this._renderFooter}
|
|
|
enableEmptySections={true}
|
|
|
enablePullToRefresh={true}
|
|
|
refreshControl={
|
...
|
...
|
|