title: Navigation Architecture Component - Activity Destination and OnNavigatedListener
body: <p>I have such code setup for navigation architecture component: </p>
  
  <pre><code> val navController = findNavController(R.id.main_nav_host_fragment)
          nav_view.setupWithNavController(navController)
          bottom_navigation.setupWithNavController(navController)
          //nav_view.setNavigationItemSelectedListener(this)
  
          navController.addOnNavigatedListener { controller, destination -&gt;
              if(destination.id == R.id.loginActivity) {
                  Toast.makeText(context, "Log Out navigation destination", Toast.LENGTH_LONG).show()
              }
          }
  </code></pre>
  
  <p>And I have found here two issues: </p>
  
  <ol>
  <li><p>Selecting in Navigation Drawer Menu Item that doesn't appear on Bottom Navigation View causes to select first Menu Item in Bottom Navigation View. Which seems to be incorrect (No Item should be selected there) </p></li>
  <li><p>OnNavigatedListener is not called when selecting Menu Item in Navigation Drawer that has menu item id set to Activity Destination (precisely action to Activity Destination) - so instead of intercepting this action and log out user, I need to pass stupid default arguments to Activity Destination in Nav Graph to log out user in Login Activity Destination. Do you know why OnNavigatedListener is not called for Activity Destinations, and is only called for Fragment Destinations? Why there is not event listener OnBeginNavigationListener to conditionally prevent navigation or add some side effects? </p></li>
  </ol>