fix navigate back to trending and claim_search end detection
This commit is contained in:
parent
4bd26d4e2e
commit
f05181898b
4 changed files with 8 additions and 9 deletions
|
@ -137,7 +137,7 @@ const drawer = createDrawerNavigator(
|
||||||
drawerIcon: ({ tintColor }) => <Icon name="home" size={drawerIconSize} style={{ color: tintColor }} />,
|
drawerIcon: ({ tintColor }) => <Icon name="home" size={drawerIconSize} style={{ color: tintColor }} />,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TrendingStack: {
|
Trending: {
|
||||||
screen: TrendingPage,
|
screen: TrendingPage,
|
||||||
navigationOptions: {
|
navigationOptions: {
|
||||||
title: 'Trending',
|
title: 'Trending',
|
||||||
|
|
|
@ -160,8 +160,8 @@ class ClaimList extends React.PureComponent {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.state.lastPageReached ||
|
this.state.lastPageReached ||
|
||||||
(claimSearchUris &&
|
((claimSearchUris.length > 0 && claimSearchUris.length < Constants.DEFAULT_PAGE_SIZE) ||
|
||||||
(claimSearchUris.length < Constants.DEFAULT_PAGE_SIZE || claimSearchUris.length >= softLimit)) ||
|
claimSearchUris.length >= softLimit) ||
|
||||||
(uris && uris.length >= softLimit)
|
(uris && uris.length >= softLimit)
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -78,7 +78,6 @@ const Constants = {
|
||||||
DRAWER_ROUTE_TAG: 'Tag',
|
DRAWER_ROUTE_TAG: 'Tag',
|
||||||
|
|
||||||
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
|
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
|
||||||
FULL_ROUTE_NAME_TRENDING: 'TrendingStack',
|
|
||||||
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
||||||
|
|
||||||
ROUTE_FILE: 'File',
|
ROUTE_FILE: 'File',
|
||||||
|
|
|
@ -11,19 +11,19 @@ function getRouteForSpecialUri(uri) {
|
||||||
|
|
||||||
switch (page) {
|
switch (page) {
|
||||||
case Constants.PAGE_REWARDS:
|
case Constants.PAGE_REWARDS:
|
||||||
targetRoute = 'Rewards';
|
targetRoute = Constants.DRAWER_ROUTE_REWARDS;
|
||||||
break;
|
break;
|
||||||
case Constants.PAGE_SETTINGS:
|
case Constants.PAGE_SETTINGS:
|
||||||
targetRoute = 'Settings';
|
targetRoute = Constants.DRAWER_ROUTE_SETTINGS;
|
||||||
break;
|
break;
|
||||||
case Constants.PAGE_TRENDING:
|
case Constants.PAGE_TRENDING:
|
||||||
targetRoute = 'TrendingStack';
|
targetRoute = Constants.DRAWER_ROUTE_TRENDING;
|
||||||
break;
|
break;
|
||||||
case Constants.PAGE_WALLET:
|
case Constants.PAGE_WALLET:
|
||||||
targetRoute = 'WalletStack';
|
targetRoute = Constants.FULL_ROUTE_NAME_WALLET;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
targetRoute = 'DiscoverStack';
|
targetRoute = Constants.FULL_ROUTE_NAME_DISCOVER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue