allow scrolling for displaying more search results #110

Merged
akinwale merged 3 commits from search-results into master 2020-01-09 16:49:15 +01:00
3 changed files with 6 additions and 10 deletions
Showing only changes of commit 2ea964dea0 - Show all commits

View file

@ -134,9 +134,7 @@ const Constants = {
ORDER_BY_EFFECTIVE_AMOUNT: 'effective_amount', ORDER_BY_EFFECTIVE_AMOUNT: 'effective_amount',
DEFAULT_PAGE_SIZE: 10, DEFAULT_PAGE_SIZE: 20,
SEARCH_RESULTS_PAGE_SIZE: 25,
ALL_PLACEHOLDER: '_all', ALL_PLACEHOLDER: '_all',

View file

@ -24,17 +24,15 @@ const select = state => ({
isSearching: selectIsSearching(state), isSearching: selectIsSearching(state),
query: selectSearchValue(state), query: selectSearchValue(state),
resolvingUris: selectResolvingUris(state), resolvingUris: selectResolvingUris(state),
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, Constants.SEARCH_RESULTS_PAGE_SIZE)(state))(state), uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, Constants.SEARCH_RESULTS_PAGE_SIZE)(state))( results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
state,
),
lastPageReached: makeSelectResolvedSearchResultsLastPageReached( lastPageReached: makeSelectResolvedSearchResultsLastPageReached(
makeSelectQueryWithOptions(null, Constants.SEARCH_RESULTS_PAGE_SIZE)(state), makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state),
)(state), )(state),
}); });
const perform = dispatch => ({ const perform = dispatch => ({
search: (query, from) => dispatch(doResolvedSearch(query, Constants.SEARCH_RESULTS_PAGE_SIZE, from, false, {})), search: (query, from) => dispatch(doResolvedSearch(query, Constants.DEFAULT_PAGE_SIZE, from, false, {})),
claimSearch: options => dispatch(doClaimSearch(options)), claimSearch: options => dispatch(doClaimSearch(options)),
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)), updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)), pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)),

View file

@ -243,7 +243,7 @@ class SearchPage extends React.PureComponent {
)} )}
{this.state.currentFrom > 0 && isSearching && ( {this.state.currentFrom > 0 && isSearching && (
<View style={searchStyle.moreLoading}> <View style={searchStyle.moreLoading}>
<ActivityIndicator size="small" coolor={Colors.NextLbryGreen} /> <ActivityIndicator size="small" color={Colors.NextLbryGreen} />
</View> </View>
)} )}
<FloatingWalletBalance navigation={navigation} /> <FloatingWalletBalance navigation={navigation} />