<commit_before>import { ShowItemRowContainer as ShowItemRow } from "lib/Components/Lists/ShowItemRow"
import Spinner from "lib/Components/Spinner"
import ZeroState from "lib/Components/States/ZeroState"
import { PAGE_SIZE } from "lib/data/constants"
import React, { Component } from "react"
import { FlatList } from "react-native"
import { ConnectionData, createPaginationContainer, graphql, RelayPaginationProp } from "react-relay"

import { Box, Separator, Theme } from "@artsy/palette"
import { Shows_me } from "__generated__/Shows_me.graphql"

interface Props {
  me: Shows_me
  relay: RelayPaginationProp
  onDataFetching?: (loading: boolean) => void
}

interface State {
  fetchingMoreData: boolean
}

export class Shows extends Component<Props, State> {
  state = {
    fetchingMoreData: false,
  }

  loadMore = () => {
    if (!this.props.relay.hasMore() || this.props.relay.isLoading()) {
      return
    }

    this.setState({ fetchingMoreData: true })
    this.props.relay.loadMore(PAGE_SIZE, error => {
      if (error) {
        // FIXME: Handle error
        console.error("Shows/index.tsx", error.message)
      }
      this.setState({ fetchingMoreData: false })
    })
  }

  render() {
    const shows = this.props.me.followsAndSaves.shows.edges.map(edge => edge.node)

    if (shows.length === 0 || !shows) {
      return (
        <ZeroState
          title="You haven’t saved any shows yet"
          subtitle="When you save shows, they will show up here for future use."
        />
      )
    }

    return (
      <Theme>
        <FlatList
          data={shows}
          keyExtractor={item => item.__id}
          renderItem={item => (
            <Box mx={2}>
              <ShowItemRow show={item.item} />
            </Box>
          )}
          onEndReached={this.loadMore}
          onEndReachedThreshold={0.2}<commit_msg>Fixes padding on global saves/follows Show list items (#1547)<commit_after>import { ShowItemRowContainer as ShowItemRow } from "lib/Components/Lists/ShowItemRow"
import Spinner from "lib/Components/Spinner"
import ZeroState from "lib/Components/States/ZeroState"
import { PAGE_SIZE } from "lib/data/constants"
import React, { Component } from "react"
import { FlatList } from "react-native"
import { ConnectionData, createPaginationContainer, graphql, RelayPaginationProp } from "react-relay"

import { Box, Separator, Theme } from "@artsy/palette"
import { Shows_me } from "__generated__/Shows_me.graphql"

interface Props {
  me: Shows_me
  relay: RelayPaginationProp
  onDataFetching?: (loading: boolean) => void
}

interface State {
  fetchingMoreData: boolean
}

export class Shows extends Component<Props, State> {
  state = {
    fetchingMoreData: false,
  }

  loadMore = () => {
    if (!this.props.relay.hasMore() || this.props.relay.isLoading()) {
      return
    }

    this.setState({ fetchingMoreData: true })
    this.props.relay.loadMore(PAGE_SIZE, error => {
      if (error) {
        // FIXME: Handle error
        console.error("Shows/index.tsx", error.message)
      }
      this.setState({ fetchingMoreData: false })
    })
  }

  render() {
    const shows = this.props.me.followsAndSaves.shows.edges.map(edge => edge.node)

    if (shows.length === 0 || !shows) {
      return (
        <ZeroState
          title="You haven’t saved any shows yet"
          subtitle="When you save shows, they will show up here for future use."
        />
      )
    }

    return (
      <Theme>
        <FlatList
          data={shows}
          keyExtractor={item => item.__id}
          renderItem={item => (
            <Box m={2}>
              <ShowItemRow show={item.item} />
            </Box>
          )}
          onEndReached={this.loadMore}
          onEndReachedThreshold={0.2}
{'fraction_non_alphanumeric': 0.12084109661964333, 'fraction_numerical': 0.0031940377961139207, 'mean_word_length': 2.7281746031746033, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4224440', 'n_tokens_mistral': 1179, 'n_tokens_neox': 1178, 'n_words': 267}