Fix crash

master
Koitharu 1 year ago
parent 3c726c1c56
commit 3ff25de252
Signed by: Koitharu
GPG Key ID: 676DEE768C17A9D7

@ -589,8 +589,11 @@ class AppRouter private constructor(
/** Private utils **/ /** Private utils **/
private fun startActivity(intent: Intent, options: Bundle? = null) { private fun startActivity(intent: Intent, options: Bundle? = null) {
fragment?.startActivity(intent, options) fragment?.also {
?: activity?.startActivity(intent, options) if (it.host != null) {
it.startActivity(intent, options)
}
} ?: activity?.startActivity(intent, options)
} }
private fun startActivitySafe(intent: Intent): Boolean = try { private fun startActivitySafe(intent: Intent): Boolean = try {

Loading…
Cancel
Save