-
Notifications
You must be signed in to change notification settings - Fork 0
[Add] #262 - amplitude 추적 이벤트 추가했습니다. | v1.1.4 버전 업데이트 #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| ].compactMapValues { $0 } | ||
| ) | ||
| } else { | ||
| self.track( | ||
| eventName: .clickHomeFilteringSave, | ||
| eventProperties: [ | ||
| "grade": UserFilteringData.shared.grade, | ||
| "jobType": UserFilteringData.shared.jobType, | ||
| "planSaveAll": false, | ||
| "startMonth": UserFilteringData.shared.startMonth, | ||
| "startYear": UserFilteringData.shared.startYear, | ||
| "workingPeriod": UserFilteringData.shared.workingPeriod | ||
| ].compactMapValues { $0 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위 아래 둘 다 compactMapValues 을 사용하면, 딕셔너리의 value가 nil일때 해당 Key, Value 값이 사라지는 것 같은데, 사용하신 이유가 궁금 합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UserFilteringData의 경우, "계획 필터링 없이 모든 공고 보기"체크박스를 선택하게 되면 계획 필터링 관련 값들이 nil로 저장되게 되어서 옵셔널 처리를 해놓았습니다!
그래서 위아래 둘다 기본값 처리를 해줘야하는데, 오류가 나지 않는 이상 기본값이 사용될 일이 없고, 오류가 발생한다해도 굳이 다른 값을 포함시킬 필요없이 혹시라도 nil일때 사라지게 하는게 좋을 것 같다고 생각했습니다!
| startMonth: TemporaryFilteringData.shared.startMonth, | ||
| jobType: TemporaryFilteringData.shared.jobType?.englishValue | ||
| ) | ||
| .materialize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.materialize()
이거는 언제 사용 되나요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저장하기 버튼을 눌렀을때, 값이 잘못 들어가서 에러가 발생했을때도, 스트림이 종료되지 않게 해서, 사용자가 옳은 값을 가지고 다시 저장하기 버튼을 눌렀을 때 요청을 재시도할 수 있도록 했습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다!
겹치는 작업이 생기면 하나에 브랜치에서 소통하면서 작업해도 좋을 것 같아요 ~!
필요 없는 파일 제가 제거하려고 했는데 제거까지 해주셔서 감사합니다 ~~
머지는 배포하고 제가 머지할게요~!!
🩵 Issue
close #262
💙 변경된 내용
1. 필터링 동시 저장되게 수정
FilteringViewModel에서 currentIndex에 상관없이 저장버튼이 눌러지면 항상 모든 값이 저장되도록 수정하였습니다.
따라서 currentIndex를 FilteringViewController와 FilteringViewModel에서 삭제했습니다.
2. 필터링 이벤트 앰플 심기
PlanFilteringViewController에 아래 코드를 추가했습니다.
FilteringViewController로 체크박스 여부를 전달해야했는데,
일단 PlanFilteringViewController에서 filteringState를 전달하는 방법과 똑같은 방식 사용했습니다.
PlanFilteringViewController에서는 bindViewModel에서 input 전달 전에 saveButton에서 탭 이벤트가 발생하면 체크박스 여부에 따라 track 호출하도록 하였습니다.
PlanFilteringViewController는 UIPageViewController의 두 번째 페이지이므로, 초기 화면에서는 viewDidLoad()가 호출되지 않았고, checkBoxState가 정확히 계산된 값이 전달되지 않고 때 초기값 false로 설정되는 문제가 있어서
pages.forEach { _ = $0.view }를 추가하여 모든 페이지의 view를 강제로 로드하였습니다.
UIPageViewController 내부에서 아직 생성되지 않은 페이지도 view를 미리 로드하여 viewDidLoad()가 실행되도록 하여 정확히 계산된 checkBoxState값이 전달되도록 하였습니다.
메모리 사용도 큰 차이는 없길래, 괜찮다고 생각했습니다!
3. 안쓰는 필터링 파일 삭제
안쓰이고 있는 FilterButton, FilteringSettingView, FilteringSettingViewController 파일 삭제했습니다.
📘 ScreenShot
2025-02-27.4.11.40.mov
🖌️ Reference