Skip to content

[FD-310] 이미지 등록후 detail 재진입시 날짜 초기화 되지 않도록 수정#101

Open
soyeonLee126 wants to merge 1 commit intomainfrom
fix/detail-date-change-upload-return-FD-310
Open

[FD-310] 이미지 등록후 detail 재진입시 날짜 초기화 되지 않도록 수정#101
soyeonLee126 wants to merge 1 commit intomainfrom
fix/detail-date-change-upload-return-FD-310

Conversation

@soyeonLee126
Copy link
Copy Markdown
Collaborator

변경 내용

  • Detail 진입 시 전달되는 initialDateString를 화면에서 다시 적용하는 타이밍이 복귀 플로우에서 재실행되면서, 이미 사용자가 이동해 둔 selectedDate를 덮어쓰는 케이스 수정
  • 이미지 피커 이동 이벤트가 화면 상태를 직접 참조해 stale date를 사용할 가능성도 존재
  • 초기 route 날짜 동기화는 1회 소비되도록 변경
  • 이미지 피커 이동 시 날짜를 이벤트 payload로 명시 전달

체크리스트

  • 빌드 정상 동작
  • 불필요한 파일 없음

LaunchedEffect(initialDateToSync) {
val dateString = initialDateToSync ?: return@LaunchedEffect
viewModel.syncSelectedDate(dateString)
initialDateToSync = null
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p4. 혹시 이러면 이펙트가 2번 발생하게 되는데 더 좋은 방법 없을까요..?
엘비스 연산자로 return 걸어놔서 안전하긴 할 것 같아서 p4로 남겨둡니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants