Authored by chenl

增加了cell渲染判断。review by shixiang。

@@ -15,6 +15,7 @@ import ReactNative, { @@ -15,6 +15,7 @@ import ReactNative, {
15 NativeAppEventEmitter, 15 NativeAppEventEmitter,
16 StyleSheet, 16 StyleSheet,
17 } from 'react-native'; 17 } from 'react-native';
  18 +import Immutable from 'immutable';
18 import SingleImage from './SingleImage'; 19 import SingleImage from './SingleImage';
19 20
20 import {SlicedImage} from '../../../common/components/SlicedImage'; 21 import {SlicedImage} from '../../../common/components/SlicedImage';
@@ -26,7 +27,14 @@ export default class BrandArticleCell extends Component { @@ -26,7 +27,14 @@ export default class BrandArticleCell extends Component {
26 constructor(props) { 27 constructor(props) {
27 super(props); 28 super(props);
28 this._renderTimeAndVisit = this._renderTimeAndVisit.bind(this); 29 this._renderTimeAndVisit = this._renderTimeAndVisit.bind(this);
  30 + }
29 31
  32 + shouldComponentUpdate(nextProps,nextState){
  33 + if (Immutable.is(nextProps.rowData, this.props.rowData)) {
  34 + return false;
  35 + } else {
  36 + return true;
  37 + }
30 } 38 }
31 39
32 //时间和访问次数以及是否喜欢 40 //时间和访问次数以及是否喜欢