Skip to content

Commit

Permalink
Fix: images를 interactor로 관리하면서 생긴 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
GeonH0 committed Jul 18, 2024
1 parent bed3b82 commit eb151d2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ extension AddRecipeViewController: AddRecipeViewDelegate {
}

func didTapDeleteButton(at index: Int) {
contentView.images.remove(at: index)
addRecipeInteractor.removeImage(at: index)
contentView.reloadCollectionView()
contentView.updateImageCounter(count: addRecipeInteractor.numberOfImages())
}
Expand Down Expand Up @@ -184,6 +184,7 @@ extension AddRecipeViewController: PHPickerViewControllerDelegate {

dispatchGroup.notify(queue: .main) { [weak self] in
guard let self else { return }
newImages.forEach { self.addRecipeInteractor.addImage($0) }
self.contentView.reloadCollectionView()
self.contentView.updateImageCounter(count: self.addRecipeInteractor.numberOfImages())
}
Expand Down

0 comments on commit eb151d2

Please sign in to comment.