Commit 9cf9d4a7 authored by Martin Santangelo's avatar Martin Santangelo

Merge branch 'fix/discovery-pull-refresh' into 'release/3.11.0'

Fix pull to refresh discovery screen

See merge request !405
parents 95e9bdf0 00aec4e8
......@@ -9,6 +9,7 @@ import {
Text,
FlatList,
Dimensions,
RefreshControl,
View,
TouchableHighlight,
Keyboard,
......@@ -110,7 +111,7 @@ export default class DiscoveryScreen extends Component {
const params = this.props.navigation.state.params;
if (params && params.query) {
this.setQ(params.query);
params.query = null; //clean query
params.query = null; //clean query
}
}, 50);
});
......@@ -230,14 +231,16 @@ export default class DiscoveryScreen extends Component {
onLayout={this.onLayout}
key={'discofl' + this.cols} // we need to force component redering if we change cols
data={discovery.listStore.entities.slice()}
bounces={true}
refreshControl={
<RefreshControl refreshing={discovery.listStore.refreshing} onRefresh={this.refresh} progressViewOffset={146} />
}
renderItem={renderRow}
ListFooterComponent={footer}
CollapsibleHeaderComponent={this.getHeaders()}
headerHeight={(GOOGLE_PLAY_STORE && discovery.filters.type !== 'channels') ? 94 : 146}
ListEmptyComponent={this.getEmptyList()}
keyExtractor={this.keyExtractor}
onRefresh={this.refresh}
refreshing={discovery.listStore.refreshing}
onEndReached={this.loadMore}
initialNumToRender={this.cols == 3 ? 12 : 3}
style={[CS.backgroundWhite, CS.flexContainer]}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment