Vaibhav Jaiswal
04/05/2025, 1:37 PMArkadii Ivanov
04/05/2025, 1:49 PMVaibhav Jaiswal
04/05/2025, 1:52 PManalyticsScreenName
property in my ScreenConfig sealed interfacesVaibhav Jaiswal
04/05/2025, 1:55 PMchildStackFlow
.mapLatest { it.active }
.filterNot { it.instance.hasNestedNavigation }
.mapLatest { it.instance.analyticsScreenName to it.configuration.landedAnalyticsProps }
.onEach { (name, props) -> Analytics.trackLanded(name, props) }
.safeCatch()
.launchIn(scope)
but if lets say RootNav navigates from HomeScreen to another screen and comes back to home, this same code in HomeComponent is not called, and the screen Name is not trackedVaibhav Jaiswal
04/05/2025, 1:55 PMinit
block
childStack.toStateFlow()
.map { it.active.instance }
.onEach { Analytics.trackLanded(it.analyticsScreenName) }
.launchIn(componentScope)
Arkadii Ivanov
04/05/2025, 2:36 PMVaibhav Jaiswal
04/05/2025, 2:39 PMVaibhav Jaiswal
04/05/2025, 2:41 PMArkadii Ivanov
04/05/2025, 2:50 PM