fix navigate back to trending and claim_search end detection

This commit is contained in:
Akinwale Ariwodola 2019-08-11 18:36:47 +01:00
parent 4bd26d4e2e
commit f05181898b
4 changed files with 8 additions and 9 deletions

View file

@ -137,7 +137,7 @@ const drawer = createDrawerNavigator(
drawerIcon: ({ tintColor }) => <Icon name="home" size={drawerIconSize} style={{ color: tintColor }} />,
},
},
TrendingStack: {
Trending: {
screen: TrendingPage,
navigationOptions: {
title: 'Trending',

View file

@ -160,8 +160,8 @@ class ClaimList extends React.PureComponent {
if (
this.state.lastPageReached ||
(claimSearchUris &&
(claimSearchUris.length < Constants.DEFAULT_PAGE_SIZE || claimSearchUris.length >= softLimit)) ||
((claimSearchUris.length > 0 && claimSearchUris.length < Constants.DEFAULT_PAGE_SIZE) ||
claimSearchUris.length >= softLimit) ||
(uris && uris.length >= softLimit)
) {
return;

View file

@ -78,7 +78,6 @@ const Constants = {
DRAWER_ROUTE_TAG: 'Tag',
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
FULL_ROUTE_NAME_TRENDING: 'TrendingStack',
FULL_ROUTE_NAME_WALLET: 'WalletStack',
ROUTE_FILE: 'File',

View file

@ -11,19 +11,19 @@ function getRouteForSpecialUri(uri) {
switch (page) {
case Constants.PAGE_REWARDS:
targetRoute = 'Rewards';
targetRoute = Constants.DRAWER_ROUTE_REWARDS;
break;
case Constants.PAGE_SETTINGS:
targetRoute = 'Settings';
targetRoute = Constants.DRAWER_ROUTE_SETTINGS;
break;
case Constants.PAGE_TRENDING:
targetRoute = 'TrendingStack';
targetRoute = Constants.DRAWER_ROUTE_TRENDING;
break;
case Constants.PAGE_WALLET:
targetRoute = 'WalletStack';
targetRoute = Constants.FULL_ROUTE_NAME_WALLET;
break;
default:
targetRoute = 'DiscoverStack';
targetRoute = Constants.FULL_ROUTE_NAME_DISCOVER;
break;
}