fix: reset navigation graph with new intent data in EmulationActivity
This commit is contained in:
parent
2c4d5f7a81
commit
dd6d6b4cf9
1 changed files with 6 additions and 0 deletions
|
@ -202,6 +202,12 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
|
|||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
setIntent(intent)
|
||||
|
||||
// Reset navigation graph with new intent data to recreate EmulationFragment
|
||||
val navHostFragment =
|
||||
supportFragmentManager.findFragmentById(R.id.fragment_container) as NavHostFragment
|
||||
navHostFragment.navController.setGraph(R.navigation.emulation_navigation, intent.extras)
|
||||
|
||||
nfcReader.onNewIntent(intent)
|
||||
InputHandler.updateControllerData()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue