You've already forked android-client
mirror of
https://github.com/netbirdio/android-client.git
synced 2026-05-22 17:10:49 -07:00
Return boolean onNavigationItemSelected
Indicating if the NavController handled navigation to the fragment successfully
This commit is contained in:
@@ -319,9 +319,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||
|
||||
// Use NavigationUI which handles launchSingleTop and saveState/restoreState
|
||||
// This prevents fragment recreation and preserves state when alternating between destinations
|
||||
NavigationUI.onNavDestinationSelected(item, navController);
|
||||
boolean isHandled = NavigationUI.onNavDestinationSelected(item, navController);
|
||||
binding.drawerLayout.closeDrawers();
|
||||
return false;
|
||||
return isHandled;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user