From 644de57666ec52e8edb44698b38ff05069f64af2 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Sat, 19 Sep 2020 19:02:04 +0900 Subject: [PATCH] Fix navigation after logging in --- .../java/awais/instagrabber/utils/NavigationExtensions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java b/app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java index f7f58bc3..9af64d87 100644 --- a/app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java +++ b/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();