Skip to content

Commit

Permalink
[FEAT/#294] home filtering amplitude
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Oct 22, 2024
1 parent 918454f commit bb2010f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions feature/src/main/java/com/terning/feature/home/HomeRoute.kt
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,19 @@ fun HomeScreen(
viewModel.updateSortingSheetVisibility(false)
},
currentSortBy = homeState.sortBy.ordinal,
onSortChange = {
onSortChange = { sortBy ->
amplitudeTracker.track(
type = EventType.CLICK,
name = when (sortBy) {
0 -> "filtered_deadline"
1 -> "filtered_short_term"
2 -> "filtered_long_term"
3 -> "filtered_scraps"
else -> "filtered_hits"
}
)
viewModel.updateSortBy(
it,
sortBy,
homeFilteringInfo.startYear,
homeFilteringInfo.startMonth,
)
Expand Down

0 comments on commit bb2010f

Please sign in to comment.