Skip to content

Commit

Permalink
[ADD/#435] 중/고등학교 userProperties 구분
Browse files Browse the repository at this point in the history
  • Loading branch information
minju1459 committed Apr 5, 2024
1 parent 6762b4f commit 58f6391
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,22 @@ class OnBoardingViewModel @Inject constructor(
}
AmplitudeManager.updateUserProperties(PROPERTY_USER_SEX, gender)
AmplitudeManager.updateUserProperties(PROPERTY_USER_NAME, nameText.value.toString())

when {
highSchool.contains("중학교") -> AmplitudeManager.updateUserProperties(EVENT_STUDENT_TYPE, VALUE_MIDDLE_SCHOOL,)
highSchool.contains("고등학교") -> AmplitudeManager.updateUserProperties(EVENT_STUDENT_TYPE, VALUE_HIGH_SCHOOL,)
else -> AmplitudeManager.updateUserProperties(EVENT_STUDENT_TYPE, VALUE_UNIVERSITY)
}
}

companion object {
private const val REGEX_ID_PATTERN = "^([A-Za-z0-9_.]*)\$"
private const val REGEX_NAME_PATTERN = "^([가-힣]*)\$"
private const val PROPERTY_USER_SEX = "user_sex"
private const val PROPERTY_USER_NAME = "user_name"
private const val EVENT_STUDENT_TYPE = "user_student_type"
private const val VALUE_UNIVERSITY = "university"
private const val VALUE_MIDDLE_SCHOOL = "middleschool"
private const val VALUE_HIGH_SCHOOL = "highschool"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class SelectStudentFragment :
binding.btnSelectTypeNext.setOnSingleClickListener {
findNavController().navigate(R.id.action_selectStudentFragment_to_universityInfoFragment)
amplitudeSelectStudent()
AmplitudeManager.updateUserProperties(EVENT_STUDENT_TYPE, VALUE_UNIVERSITY)
val activity = requireActivity() as OnBoardingActivity
activity.progressBarPlus()
}
Expand Down

0 comments on commit 58f6391

Please sign in to comment.