Commit 00aec4e8 authored by Martin Santangelo's avatar Martin Santangelo
Browse files

(fix) pull to refresh discovery screen

parent bb7275ee
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -9,6 +9,7 @@ import {
  Text,
  Text,
  FlatList,
  FlatList,
  Dimensions,
  Dimensions,
  RefreshControl,
  View,
  View,
  TouchableHighlight,
  TouchableHighlight,
  Keyboard,
  Keyboard,
@@ -230,14 +231,16 @@ export default class DiscoveryScreen extends Component {
        onLayout={this.onLayout}
        onLayout={this.onLayout}
        key={'discofl' + this.cols} // we need to force component redering if we change cols
        key={'discofl' + this.cols} // we need to force component redering if we change cols
        data={discovery.listStore.entities.slice()}
        data={discovery.listStore.entities.slice()}
        bounces={true}
        refreshControl={
          <RefreshControl refreshing={discovery.listStore.refreshing} onRefresh={this.refresh} progressViewOffset={146} />
        }
        renderItem={renderRow}
        renderItem={renderRow}
        ListFooterComponent={footer}
        ListFooterComponent={footer}
        CollapsibleHeaderComponent={this.getHeaders()}
        CollapsibleHeaderComponent={this.getHeaders()}
        headerHeight={(GOOGLE_PLAY_STORE && discovery.filters.type !== 'channels') ? 94 : 146}
        headerHeight={(GOOGLE_PLAY_STORE && discovery.filters.type !== 'channels') ? 94 : 146}
        ListEmptyComponent={this.getEmptyList()}
        ListEmptyComponent={this.getEmptyList()}
        keyExtractor={this.keyExtractor}
        keyExtractor={this.keyExtractor}
        onRefresh={this.refresh}
        refreshing={discovery.listStore.refreshing}
        onEndReached={this.loadMore}
        onEndReached={this.loadMore}
        initialNumToRender={this.cols == 3 ? 12 : 3}
        initialNumToRender={this.cols == 3 ? 12 : 3}
        style={[CS.backgroundWhite, CS.flexContainer]}
        style={[CS.backgroundWhite, CS.flexContainer]}