From bb2010ffaa1409f7ad07ba55c8d1ce5095fa80f5 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Wed, 23 Oct 2024 06:37:08 +0900 Subject: [PATCH] [FEAT/#294] home filtering amplitude --- .../java/com/terning/feature/home/HomeRoute.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/feature/src/main/java/com/terning/feature/home/HomeRoute.kt b/feature/src/main/java/com/terning/feature/home/HomeRoute.kt index 0be11ed9..32292065 100644 --- a/feature/src/main/java/com/terning/feature/home/HomeRoute.kt +++ b/feature/src/main/java/com/terning/feature/home/HomeRoute.kt @@ -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, )