diff --git a/app/src/main/java/awais/instagrabber/activities/MainActivity.kt b/app/src/main/java/awais/instagrabber/activities/MainActivity.kt
index fbf89442..1af701d1 100644
--- a/app/src/main/java/awais/instagrabber/activities/MainActivity.kt
+++ b/app/src/main/java/awais/instagrabber/activities/MainActivity.kt
@@ -340,7 +340,8 @@ class MainActivity : BaseLanguageActivity() {
it.startDestinationFragmentId
}.toMutableList().apply {
add(R.id.postViewFragment)
- add(R.id.favoritesFragment)
+ add(R.id.favorites_non_top)
+ add(R.id.notifications_viewer_non_top)
add(R.id.profile_non_top)
}
if (setDefaultTabFromSettings) {
@@ -356,7 +357,7 @@ class MainActivity : BaseLanguageActivity() {
rootNavGraph.id = R.id.root_nav_graph
rootNavGraph.label = "root_nav_graph"
rootNavGraph.addDestinations(topLevelDestinations)
- rootNavGraph.setStartDestination(if (startNavRootId != 0) startNavRootId else R.id.profile_nav_graph)
+ rootNavGraph.startDestination = if (startNavRootId != 0) startNavRootId else R.id.profile_nav_graph
navController.graph = rootNavGraph
binding.bottomNavView.setupWithNavController(navController)
appBarConfiguration = AppBarConfiguration(currentTabs.map { it.startDestinationFragmentId }.toSet())
diff --git a/app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java b/app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java
index 51186d50..32533906 100644
--- a/app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java
+++ b/app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java
@@ -194,7 +194,12 @@ public class MorePreferencesFragment extends BasePreferencesFragment {
if (showExplore) {
screen.addPreference(getPreference(R.string.title_discover, R.drawable.ic_explore_24, preference -> {
if (isSafeToNavigate(navController)) {
- navController.navigate(R.id.discover_nav_graph);
+ try {
+ final NavDirections navDirections = MorePreferencesFragmentDirections.actionToDiscover();
+ navController.navigate(navDirections);
+ } catch (Exception e) {
+ Log.e(TAG, "setupPreferenceScreen: ", e);
+ }
}
return true;
}));
diff --git a/app/src/main/res/navigation/more_nav_graph.xml b/app/src/main/res/navigation/more_nav_graph.xml
index 61d6f0ef..42235145 100644
--- a/app/src/main/res/navigation/more_nav_graph.xml
+++ b/app/src/main/res/navigation/more_nav_graph.xml
@@ -14,6 +14,10 @@
android:id="@+id/action_to_settings"
app:destination="@id/settings_nav_graph" />
+
+
@@ -517,6 +521,8 @@
+
+
-