mirror of
https://github.com/KokaKiwi/BarInsta
synced 2026-03-14 00:11:40 +00:00
navigation fixes related to more tab
This commit is contained in:
parent
db5f6b73fb
commit
114a0b090e
4 changed files with 15 additions and 7 deletions
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue