Skip to content

Conversation

@thingineeer
Copy link
Collaborator

@thingineeer thingineeer commented Oct 14, 2023

🌱 작업한 내용

  • 나의 업로드한 코스 삭제 기능을 사용했을때,
    삭제 -> 뷰 새로고침 으로 로직이 되어야하는데
    뷰 새로고침 -> 삭제 순서가 되어버려서 나의 업로드한 코스가 새로고침이 안되는 오류가 발생 하였습니다.
    (이벤트 시점 문제)
  • 삭제 후 뷰 이동이 안되는 부분도 해결하였습니다 -> [Feat] #192 - 코스 상세 페이지 알림 변경 #192

🌱 PR Point

  • deleteCourse에 동기 처리로 0.1초의 텀을 두었습니다.
  • 또한 DispatchQueue.main.asyncAfter() 쓰는 게 좋은 코드인지? 생각해 봐야겠습니다.

📸 스크린샷

  • ❌ ver 2.0.0 전 (코스 1개 삭제 시 코스 1개 그대로 남아 있고 뷰 이동도 처리되지 않음)
    (UI도 업데이트전 ^^..)
default.mp4

  • ✅ ver 2.0.0 후 ( 코스 2개 에서 1개 새로고침 + 뷰 이동 처리 )
default.mp4

📮 관련 이슈

Comment on lines 559 to 561
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.navigationController?.popViewController(animated: true)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

0.1초 이후에 했을 때도 비슷한 이슈가 생겨서 0.2초로 늘리면 순서야 보장은 되겠지만,,
삭제했을 때 200코드 받으면 popVC하는 방향은 어떤지요. 나중에 같이 리팩토링 할 기회가 생긴다면 고민해봅시당 ~~

Copy link
Collaborator Author

@thingineeer thingineeer Oct 18, 2023

Choose a reason for hiding this comment

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

좋은 의견 감사합니다.
코스 지울 때 네트워크 과정에서 200code 받을 때 popVC 하는 걸로 변경하였습니다.
확인해 주시면 감사하겠습니다.

@thingineeer thingineeer merged commit c48c3e4 into Runnect:develop Oct 19, 2023
@thingineeer thingineeer deleted the #196---코스-삭제-이벤트시-시점-이슈 branch October 19, 2023 06:19
@thingineeer thingineeer added the UX label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] #196 - 코스 삭제 이벤트시 시점 이슈 발견

2 participants