Skip to content
Permalink
Browse files

Add requireFragmentManager() and requireContext() usages

  • Loading branch information
zsmb13 committed Jan 7, 2020
1 parent 07afada commit 9edc0fc769bf184caf75d81b42c7c76e46ef30d5
@@ -71,7 +71,8 @@ class DashboardFragment : Fragment() {

val pager = viewPager
val tabs = tabs
pager.adapter = ViewPagerAdapter(fragmentManager!!, context!!, pokemon.id!!)
pager.adapter =
ViewPagerAdapter(requireFragmentManager(), requireContext(), pokemon.id!!)
tabs.setupWithViewPager(pager)
}
})
@@ -74,13 +74,13 @@ class PokedexFragment : Fragment() {

private fun showAllGen() {
val dialog = GenerationFragment()
dialog.show(fragmentManager!!, "")
dialog.show(requireFragmentManager(), "")

}

private fun showSearch() {
val dialog = SearchFragment()
dialog.show(fragmentManager!!, "")
dialog.show(requireFragmentManager(), "")
}

}

0 comments on commit 9edc0fc

Please sign in to comment.
You can’t perform that action at this time.