@SOLVED hey folks i'm on HomeFragment and wanting ...
# android
m
@SOLVED hey folks i'm on HomeFragment and wanting to navigate to DetailFragment HomeFragment.kt
Copy code
homeFragmentViewModel.navigateToDetail.observe(this, Observer {
            val action = HomeFragmentDirections.actionHomeFragmentToDetailFragment2()
            action.id = id
            this.findNavController().navigate(action)
            homeFragmentViewModel.navigatedToDetail()
        })
when I click on one of my list, it throws me: n`avigation destination myapp:id/action_homeFragment_to_detailFragment2 is unknown to this NavController` solved by checking the current fragment i'm on first
z
homeFragmentViewModel.navigatedToDetail()
can't wait to forget to call this call and then navigate to that screen each time I go back 🤔