Authored by Zhu-Arthur

达人适配iOS review by 戴强

... ... @@ -19,7 +19,7 @@ export default class RankBody extends Component {
keyExtractor={(item, index) => index}
renderItem={({item, index}) => this._renderItem(item, index)}
getItemLayout={(data, index) => ({length: 70 * DEVICE_WIDTH_RATIO, offset: 70 * DEVICE_WIDTH_RATIO * index, index})}
getItemCount={(data) => data.size}
getItemCount={(data) => data.size || 0}
getItem={(data, index) => data.get(index)}
data={this.props.dataSource}
onEndReachedThreshold={0.5}
... ... @@ -86,7 +86,7 @@ const styles = StyleSheet.create({
avatar: {
height: 40 * DEVICE_WIDTH_RATIO,
width: 40 * DEVICE_WIDTH_RATIO,
borderWidth: 1,
overflow: 'hidden',
borderRadius: 20 * DEVICE_WIDTH_RATIO,
marginLeft: 15 * DEVICE_WIDTH_RATIO,
},
... ...
... ... @@ -189,7 +189,8 @@ const styles = StyleSheet.create({
avatar: {
height: 60 * DEVICE_WIDTH_RATIO,
width: 60 * DEVICE_WIDTH_RATIO,
borderWidth: 1,
overflow: 'hidden',
borderRadius: 30 * DEVICE_WIDTH_RATIO,
},
name: {
fontFamily: 'PingFang-SC-Medium',
... ...
... ... @@ -28,8 +28,8 @@ export function setUid(uid) {
export function getUnionType() {
return async dispatch => {
let unionType = await NativeModules.YH_CommonHelper.unionType();;
dispatch(setUnionType(unionType))
let unionType = await NativeModules.YH_CommonHelper.unionType();
dispatch(setUnionType(unionType));
}
}
... ...