Skip to content

Conversation

@hyowon612
Copy link
Collaborator

⭐️Issue

#125

🌟Motivation

DeletePopupViewController에 MVVM 패턴을 적용했습니다.

🌟Key Changes

  • NovelDetailViewModel을 추가해 기존 비즈니스 로직을 ViewModel로 이동시켰습니다.
  • PopupStatus를 Input으로 받아 케이스를 나눠 deleteButtonDidTapEvent를 subscribe 해주었습니다.

🌟Simulation

없어용가리

🌟To Reviewer

popupStatus도 viewModel이 들고 있는게 맞다는 생각이 들지만,, 뷰컨에서 rootView 초기화시 popupStatus가 필요해 일단 뷰컨에서 들고 있도록 구현했쌉다 🤓

Copy link
Member

@Guryss Guryss left a comment

Choose a reason for hiding this comment

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

수고했서용 ! 정말 잘한당 ㅋㅋ

Comment on lines 33 to 34
let deleteButtonDidTapEvent: Observable<Void>

Copy link
Member

Choose a reason for hiding this comment

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

W1;
줄 없애라능

Copy link
Contributor

@Naknakk Naknakk left a comment

Choose a reason for hiding this comment

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

고생했습니다!-! 이전 코리 내용 같이 고려해보면 될 것 같아요!! 팝업이라 이전 뷰 내용 가져오기도 애매하구 뷰모델이 많아질 수 밖에 없어서 아쉬우네요 .,. 애매했을텐데 고생했습니당!-!

Copy link
Member

@ena-isme ena-isme left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

.flatMapLatest {
self.deleteUserNovel()
}
.subscribe(with: self, onNext: { owner, _ in
Copy link
Member

Choose a reason for hiding this comment

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

W3
self 사용하는 부분이 없어서 owner 로 작성안해도 될 것 같기는 해요~!

@hyowon612 hyowon612 merged commit f7a9a76 into main Mar 2, 2024
@hyowon612 hyowon612 deleted the Refactor/#125-DeletePopup branch March 2, 2024 10:42
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.

5 participants