Skip to content

Commit

Permalink
YAPP-19th#61 - 팀원 모집 뷰에서 모집인원 뷰 런타임 에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
ITlearning committed Jan 13, 2022
1 parent ab40412 commit 7e0d2d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ protocol ProjectMembersBottomViewControllerDelegate: AnyObject {
func getRecruitingPositions(_ recruitingPositions: [RecruitingPosition], _ selectPosition: Int)
}

extension ProjectMembersBottomViewControllerDelegate {
func getRecruitingPositions(_ recruitingPositions: [RecruitingPosition], _ selectPosition: Int = 0) {
getRecruitingPositions(recruitingPositions, selectPosition)
}
}

final class ProjectMembersBottomViewController: UIViewController {

@IBOutlet private weak var backgroundView: UIView!
Expand Down Expand Up @@ -74,7 +68,7 @@ private extension ProjectMembersBottomViewController {
.receive(on: DispatchQueue.main)
.sink { [weak self] _ in
guard let self = self else { return }
self.delegate?.getRecruitingPositions(self.recruitingPositions)
self.delegate?.getRecruitingPositions(self.recruitingPositions, 0)
self.hideBottomView()
}.store(in: &cancellables)

Expand All @@ -86,7 +80,7 @@ private extension ProjectMembersBottomViewController {
case .myBudi:
self.delegate?.getRecruitingPositions(self.recruitingPositions, self.selectPosition)
case .writing:
self.delegate?.getRecruitingPositions(self.recruitingPositions)
self.delegate?.getRecruitingPositions(self.recruitingPositions, 0)
}
self.hideBottomView()
}.store(in: &cancellables)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ extension HomeWritingViewController: HomeLocationSearchViewControllerDelegate {
}

extension HomeWritingViewController: ProjectMembersBottomViewControllerDelegate {
func getRecruitingPositions(_ recruitingPositions: [RecruitingPosition]) {
func getRecruitingPositions(_ recruitingPositions: [RecruitingPosition], _ selectPosition: Int) {
viewModel.state.recruitingPositions.value = recruitingPositions
collectionView.reloadData()
isValid()
Expand Down
4 changes: 1 addition & 3 deletions Budi/Budi/Source/MyBudi/Edit/MyBudiEditViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ final class MyBudiEditViewController: UIViewController {
}
.store(in: &cancellables)



}

func modalViewBackgoundOn() {
Expand Down Expand Up @@ -291,7 +289,7 @@ extension MyBudiEditViewController: UITableViewDelegate, UITableViewDataSource {
} else {
cell.configureLabel(text: "한줄소개")
cell.configureText(text: self.viewModel.state.loginUserData.value?.description ?? "")

cell.normalTextField.textPublisher
.receive(on: DispatchQueue.main)
.sink { [weak self] text in
Expand Down

0 comments on commit 7e0d2d7

Please sign in to comment.