From 7c8f121e83768abdb886baba7aa0dc1815b6b95b Mon Sep 17 00:00:00 2001 From: Greg Price Date: Fri, 9 Aug 2019 17:10:02 -0700 Subject: [PATCH] nav: Cut more unused action creators; document shadow navigation. These two aren't called, but we *do* go to the routes -- by the one other way we do so besides invoking nav action creators, which is to return them from `navReducer`. Mention those here -- as well as the two others that we can navigate to that way -- for cross-reference. --- src/nav/navActions.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nav/navActions.js b/src/nav/navActions.js index 01d23469e38..8bfe8ce80af 100644 --- a/src/nav/navActions.js +++ b/src/nav/navActions.js @@ -20,6 +20,12 @@ export const navigateBack = () => (dispatch: Dispatch, getState: GetState): Navi export const navigateToChat = (narrow: Narrow): NavigateAction => NavigationActions.navigate({ routeName: 'chat', params: { narrow } }); +// Other stack routes reached through `navReducer`: +// NavigationActions.navigate({ routeName: 'loading' }); +// NavigationActions.navigate({ routeName: 'welcome' }); +// NavigationActions.navigate({ routeName: 'account' }); +// NavigationActions.navigate({ routeName: 'main' }); + export const navigateToUsersScreen = (): NavigateAction => NavigationActions.navigate({ routeName: 'users' }); @@ -52,9 +58,6 @@ export const navigateToRealmScreen = (realm?: string): NavigateAction => export const navigateToLightbox = (src: string, message: Message): NavigateAction => NavigationActions.navigate({ routeName: 'lightbox', params: { src, message } }); -export const navigateToLoading = (): NavigateAction => - NavigationActions.navigate({ routeName: 'loading' }); - export const navigateToLanguage = (): NavigateAction => NavigationActions.navigate({ routeName: 'language' }); @@ -67,9 +70,6 @@ export const navigateToDiagnostics = (): NavigateAction => export const navigateToWelcomeHelp = (): NavigateAction => NavigationActions.navigate({ routeName: 'welcome-help' }); -export const navigateToWelcomeScreen = (): NavigateAction => - NavigationActions.navigate({ routeName: 'welcome' }); - export const navigateToVariables = (): NavigateAction => NavigationActions.navigate({ routeName: 'variables' });