Further state saving fixes

parent 77082df6
......@@ -48,7 +48,9 @@ abstract class ServiceBoundSettingsActivity(private val fragment: Fragment? = nu
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
val fragment = this.fragment ?: this.fragment()
val fragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
?: this.fragment
?: this.fragment()
if (fragment != null) {
val transaction = supportFragmentManager.beginTransaction()
fragment.arguments = arguments
......
......@@ -47,7 +47,9 @@ abstract class SettingsActivity(protected val fragment: Fragment? = null) : Them
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
val fragment = this.fragment ?: this.fragment()
val fragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
?: this.fragment
?: this.fragment()
if (fragment != null) {
val transaction = supportFragmentManager.beginTransaction()
fragment.arguments = arguments
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment