Commit 2115bcd8 authored by topjohnwu's avatar topjohnwu

Relaunch and recreate is slightly different

parent 1bdd6e1a
......@@ -59,7 +59,7 @@ abstract class BaseMainActivity<VM : BaseViewModel, Binding : ViewDataBinding>
doPreload = false
if (isRunningAsStub) {
// Re-launch main activity without splash theme
recreate()
relaunch()
} else {
showMainUI(savedInstanceState)
}
......
......@@ -69,4 +69,9 @@ abstract class BaseActivity : AppCompatActivity() {
startActivity(Intent().setComponent(intent.component))
finish()
}
fun relaunch() {
startActivity(Intent(intent).setFlags(0))
finish()
}
}
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