-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: 명함 그룹 관련 API 연결 #434 #456
Conversation
func makeUpdateVC() -> UpdateViewController | ||
func makeCardDetailVC() -> CardDetailViewController | ||
func makeGroupEditVC(groupList: [Group]) -> GroupEditViewController |
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.
감사합니더👍
@@ -191,7 +191,7 @@ public class GroupAPI { | |||
else { return .pathErr } | |||
|
|||
switch statusCode { | |||
case 200: | |||
case 200, 201: |
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.
요거 다 200으로 준대여!
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.
반영하겠습니다!
import UIKit | ||
|
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.
👍
groupEditTableView.register(GroupEditTableViewCell.nib(), forCellReuseIdentifier: Const.Xib.groupEditTableViewCell) | ||
groupEditTableView.register(EmptyGroupEditTableViewCell.nib(), forCellReuseIdentifier: Const.Xib.EmptyGroupEditTableViewCell) |
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.
className 으로 사용해도 좋을 듯합니당 저는 일단 작업하면서 밟히는 것들부터 하나씩 적용했습니당
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.
아 좋습니다 좋습니다 이거 적용해놓겠습니다!
import RxSwift | ||
import RxRelay | ||
|
||
final class GroupEditViewModel: ViewModelType { | ||
|
||
// MARK: - Properties | ||
|
||
private let disposeBag = DisposeBag() | ||
var groupList: [Group] = [] | ||
|
||
// MARK: - Inputs | ||
|
||
struct Input { | ||
let viewWillAppearEvent: Observable<Void> | ||
} | ||
|
||
// MARK: - Outputs | ||
|
||
struct Output { | ||
var groupListRelay = PublishRelay<[Group]>() | ||
} | ||
|
||
// MARK: - Initialize | ||
|
||
init(groupList: [Group]) { | ||
self.groupList = groupList | ||
} | ||
} | ||
|
||
extension GroupEditViewModel { | ||
func transform(input: Input) -> Output { | ||
let output = Output() | ||
|
||
input.viewWillAppearEvent | ||
.withUnretained(self) | ||
.subscribe { owner, _ in | ||
output.groupListRelay.accept(owner.groupList) | ||
} | ||
.disposed(by: self.disposeBag) | ||
|
||
return output | ||
} | ||
} |
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.
여기서두 저번에 view model 코드리뷰와 동일하게 disposeBag 을 사용하며 뷰 모델에서 구독이 진행되서 수정되면 좋겠습니당!
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.
좋습니당
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.
선생님 뷰컨 구독 이슈 일단 냅두고 합친 다음에 이슈 다시 파서 수정하겠습니다! (제가 다른 곳에서도 뷰모델에서 구독을 갈겨놔서...)
지금 API 부터 일단 연결 다시 해보겠습니다!
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.
그랴요!
출시하고 좀 정리할거 정리해서 리스트업 해봅시다
🌴 PR 요약
🌱 작업한 브랜치
🌱 작업한 내용
📮 관련 이슈