reorder items in drawer menu to match the desktop app menu (#410)

* reorder items in drawer menu to match the desktop app menu
* change icon for Explore
This commit is contained in:
Akinwale Ariwodola 2019-01-22 21:17:21 +01:00 committed by GitHub
parent 4e22b53907
commit 6d234672b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -67,7 +67,7 @@ const discoverStack = createStackNavigator({
Discover: {
screen: DiscoverPage,
navigationOptions: ({ navigation }) => ({
title: 'Discover',
title: 'Explore',
headerLeft: menuNavigationButton(navigation),
headerTitleStyle: discoverStyle.titleText
})
@ -166,7 +166,7 @@ const walletStack = createStackNavigator({
const drawer = createDrawerNavigator({
DiscoverStack: { screen: discoverStack, navigationOptions: {
title: 'Discover', drawerIcon: ({ tintColor }) => <Icon name="compass" size={20} style={{ color: tintColor }} />
title: 'Explore', drawerIcon: ({ tintColor }) => <Icon name="home" size={20} style={{ color: tintColor }} />
}},
TrendingStack: { screen: trendingStack, navigationOptions: {
title: 'Trending', drawerIcon: ({ tintColor }) => <Icon name="fire" size={20} style={{ color: tintColor }} />
@ -174,14 +174,14 @@ const drawer = createDrawerNavigator({
MySubscriptionsStack: { screen: mySubscriptionsStack, navigationOptions: {
title: 'My Subscriptions', drawerIcon: ({ tintColor }) => <Icon name="rss-square" size={20} style={{ color: tintColor }} />
}},
MyLBRYStack: { screen: myLbryStack, navigationOptions: {
title: 'My LBRY', drawerIcon: ({ tintColor }) => <Icon name="folder" size={20} style={{ color: tintColor }} />
WalletStack: { screen: walletStack, navigationOptions: {
title: 'Wallet', drawerIcon: ({ tintColor }) => <Icon name="wallet" size={20} style={{ color: tintColor }} />
}},
Rewards: { screen: rewardsStack, navigationOptions: {
drawerIcon: ({ tintColor }) => <Icon name="trophy" size={20} style={{ color: tintColor }} />
}},
WalletStack: { screen: walletStack, navigationOptions: {
title: 'Wallet', drawerIcon: ({ tintColor }) => <Icon name="wallet" size={20} style={{ color: tintColor }} />
MyLBRYStack: { screen: myLbryStack, navigationOptions: {
title: 'My LBRY', drawerIcon: ({ tintColor }) => <Icon name="folder" size={20} style={{ color: tintColor }} />
}},
Settings: { screen: SettingsPage, navigationOptions: {
drawerLockMode: 'locked-closed',

View file

@ -135,8 +135,8 @@ export function navigateBack(navigation, drawerStack, popDrawerStack) {
export function dispatchNavigateBack(dispatch, nav, drawerStack, popDrawerStack) {
const drawerRouteIndex = nav.routes[0].index;
const shouldPopStack = (
(drawerRouteIndex > 0 && drawerRouteIndex !== 5) || // not the discover nor wallet stack
(drawerRouteIndex === 5 && nav.routes[0].routes[drawerRouteIndex].index === 0) // wallet stack, and tx history page not active
(drawerRouteIndex > 0 && drawerRouteIndex !== 3) || // not the discover nor wallet stack
(drawerRouteIndex === 3 && nav.routes[0].routes[drawerRouteIndex].index === 0) // wallet stack, and tx history page not active
);
if (shouldPopStack) {
dispatch(NavigationActions.back());