Browse Source

Fix navigation after logging in

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
644de57666
  1. 4
      app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java

4
app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java

@ -34,7 +34,7 @@ public class NavigationExtensions {
int firstFragmentGraphId = 0;
for (int i = 0; i < navGraphIds.size(); i++) {
final int navGraphId = navGraphIds.get(i);
final String fragmentTag = getFragmentTag(i);
final String fragmentTag = getFragmentTag(navGraphId);
final NavHostFragment navHostFragment = obtainNavHostFragment(fragmentManager, fragmentTag, navGraphId, containerId);
final NavController navController = navHostFragment.getNavController();
final int graphId = navController.getGraph().getId();
@ -177,7 +177,7 @@ public class NavigationExtensions {
final Intent intent) {
for (int i = 0; i < navGraphIds.size(); i++) {
final int navGraphId = navGraphIds.get(i);
final String fragmentTag = getFragmentTag(i);
final String fragmentTag = getFragmentTag(navGraphId);
final NavHostFragment navHostFragment = obtainNavHostFragment(fragmentManager, fragmentTag, navGraphId, containerId);
if (navHostFragment.getNavController().handleDeepLink(intent)) {
final int selectedItemId = bottomNavigationView.getSelectedItemId();

Loading…
Cancel
Save