Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
Remove deeplink support
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbanes committed Oct 12, 2019
1 parent 0e239ec commit 0c56c69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/app/tivi/home/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ class HomeActivity : TiviActivityMvRxView() {
listOf(R.navigation.discover_nav_graph, R.navigation.watched_nav_graph,
R.navigation.following_nav_graph, R.navigation.search_nav_graph),
supportFragmentManager,
R.id.home_nav_container,
intent
R.id.home_nav_container
).observe(this) { navController ->
currentNavController = navController

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fun BottomNavigationView.setupWithNavController(
navGraphIds: List<Int>,
fragmentManager: FragmentManager,
containerId: Int,
intent: Intent
intent: Intent? = null
): LiveData<NavController> {

// Map of tags
Expand Down Expand Up @@ -136,7 +136,9 @@ fun BottomNavigationView.setupWithNavController(
setupItemReselected(graphIdToTagMap, fragmentManager)

// Handle deep link
setupDeepLinks(navGraphIds, fragmentManager, containerId, intent)
if (intent != null) {
setupDeepLinks(navGraphIds, fragmentManager, containerId, intent)
}

// Finally, ensure that we update our BottomNavigationView when the back stack changes
fragmentManager.addOnBackStackChangedListener {
Expand Down

0 comments on commit 0c56c69

Please sign in to comment.