Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavigationReducer #3

Open
tutrieuchau opened this issue Jun 14, 2018 · 1 comment
Open

NavigationReducer #3

tutrieuchau opened this issue Jun 14, 2018 · 1 comment

Comments

@tutrieuchau
Copy link

tutrieuchau commented Jun 14, 2018

I built an simple android app which use rekotlin-router and rekotlin library.
I find out that when i dispatch an action which is not navigation action.
Navigation reducer replace my navigation state by root navigation state.
I looking in your library and then i realize that something wrong in NavigationReducer

when(action)  {
        is SetRouteAction -> navigationState = setRoute(navigationState,action)
        is SetRouteSpecificData -> navigationState = setRouteSpecificData(navigationState, action.route,  action.data)
        else -> NavigationState() // Some thing wrong in here
}

I think it should be:

when(action)  {
        is SetRouteAction -> navigationState = setRoute(navigationState,action)
        is SetRouteSpecificData -> navigationState = setRouteSpecificData(navigationState, action.route,  action.data)
        else -> // Return old navigation state
}
@simonckenyon
Copy link

well? did this get resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants