|
|
@ -131,17 +131,7 @@ class ForYouViewModel @Inject constructor(
|
|
|
|
if (newsResourceId == deepLinkedNewsResource.value?.id) {
|
|
|
|
if (newsResourceId == deepLinkedNewsResource.value?.id) {
|
|
|
|
savedStateHandle[LINKED_NEWS_RESOURCE_ID] = null
|
|
|
|
savedStateHandle[LINKED_NEWS_RESOURCE_ID] = null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
analyticsHelper.logEvent(
|
|
|
|
analyticsHelper.logNewsDeepLinkOpen(newsResourceId = newsResourceId)
|
|
|
|
AnalyticsEvent(
|
|
|
|
|
|
|
|
type = "news_deep_link_opened",
|
|
|
|
|
|
|
|
extras = listOf(
|
|
|
|
|
|
|
|
Param(
|
|
|
|
|
|
|
|
key = LINKED_NEWS_RESOURCE_ID,
|
|
|
|
|
|
|
|
value = newsResourceId,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
viewModelScope.launch {
|
|
|
|
viewModelScope.launch {
|
|
|
|
userDataRepository.setNewsResourceViewed(
|
|
|
|
userDataRepository.setNewsResourceViewed(
|
|
|
|
newsResourceId = newsResourceId,
|
|
|
|
newsResourceId = newsResourceId,
|
|
|
@ -156,3 +146,16 @@ class ForYouViewModel @Inject constructor(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun AnalyticsHelper.logNewsDeepLinkOpen(newsResourceId: String) =
|
|
|
|
|
|
|
|
logEvent(
|
|
|
|
|
|
|
|
AnalyticsEvent(
|
|
|
|
|
|
|
|
type = "news_deep_link_opened",
|
|
|
|
|
|
|
|
extras = listOf(
|
|
|
|
|
|
|
|
Param(
|
|
|
|
|
|
|
|
key = LINKED_NEWS_RESOURCE_ID,
|
|
|
|
|
|
|
|
value = newsResourceId,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|