text: /*
   * @Author: czy0729
   * @Date: 2020-05-21 17:07:34
   * @Last Modified by: czy0729
   * @Last Modified time: 2021-01-26 20:54:47
   */
  import React from 'react'
  import { Loading, ListView } from '@components'
  import { ItemCharacter } from '@screens/_'
  import { _ } from '@stores'
  import { keyExtractor } from '@utils/app'
  import { obc } from '@utils/decorators'
  
  const event = {
    id: '制作人员.跳转'
  }
  
  export default
  @obc
  class List extends React.Component {
    renderItem = ({ item, index }) => {
      const { navigation } = this.context
      return (
        <ItemCharacter
          style={_.container.item}
          navigation={navigation}
          index={index}
          event={event}
          type='person'
          {...item}
        />
      )
    }
  
    render() {
      const { $ } = this.context
      const { _loaded } = $.persons
      if (!_loaded) {
        return <Loading />
      }
  
      return (
        <ListView
          contentContainerStyle={this.styles.contentContainerStyle}
          keyExtractor={keyExtractor}
          data={$.persons}
          renderItem={this.renderItem}
        />
      )
    }
  
    get styles() {
      return memoStyles()
    }
  }
  
  const memoStyles = _.memoStyles(_ => ({
    contentContainerStyle: {
      paddingBottom: _.bottom
    }
  }))
  