|
|
@ -62,12 +62,17 @@ open class HomeActivity : AppCompatActivity() {
|
|
|
|
setSupportActionBar(navigationToolbar)
|
|
|
|
setSupportActionBar(navigationToolbar)
|
|
|
|
NavigationUI.setupWithNavController(navigationToolbar, navHost.navController, appBarConfiguration)
|
|
|
|
NavigationUI.setupWithNavController(navigationToolbar, navHost.navController, appBarConfiguration)
|
|
|
|
|
|
|
|
|
|
|
|
val safeIntent = intent?.let { SafeIntent(it) }
|
|
|
|
intent
|
|
|
|
|
|
|
|
?.let { SafeIntent(it) }
|
|
|
|
if (safeIntent?.isLauncherIntent == true) {
|
|
|
|
?.let {
|
|
|
|
val source = if (isCustomTab) Event.OpenedApp.Source.CUSTOM_TAB else Event.OpenedApp.Source.APP_ICON
|
|
|
|
when {
|
|
|
|
components.analytics.metrics.track(Event.OpenedApp(source))
|
|
|
|
isCustomTab -> Event.OpenedApp.Source.CUSTOM_TAB
|
|
|
|
}
|
|
|
|
it.isLauncherIntent -> Event.OpenedApp.Source.APP_ICON
|
|
|
|
|
|
|
|
it.action == Intent.ACTION_VIEW -> Event.OpenedApp.Source.LINK
|
|
|
|
|
|
|
|
else -> null
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?.also { components.analytics.metrics.track(Event.OpenedApp(it)) }
|
|
|
|
|
|
|
|
|
|
|
|
handleOpenedFromExternalSourceIfNecessary(intent)
|
|
|
|
handleOpenedFromExternalSourceIfNecessary(intent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|