Fix crash

This commit is contained in:
Koitharu
2025-03-30 09:54:04 +03:00
parent 3c726c1c56
commit 3ff25de252

View File

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