goToPreviousOrMainActivity

fun Context.goToPreviousOrMainActivity(currentActivityName: String, navBackComponent: NavBackComponent? = null)

Go back to launcher activity if this function's caller is the solely task for the app