Skip to content

Commit feff494

Browse files
committed
[Chore] #229 - 프로토콜 네이밍 변경
1 parent 9222aed commit feff494

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class CourseDetailVC: UIViewController {
2424
// MARK: - Properties
2525

2626
weak var delegate: ScrapStateDelegate? // 코스 발견 스크랩 이벤트
27-
weak var marathonDelegate: MarathonCourseDelegate? // 마라톤 스크랩 이벤트
27+
weak var marathonDelegate: MarathonScrapStateDelegate? // 마라톤 스크랩 이벤트
2828

2929
private let scrapProvider = Providers.scrapProvider
3030
private let publicCourseProvider = Providers.publicCourseProvider
@@ -166,7 +166,7 @@ extension CourseDetailVC {
166166

167167
scrapCourse(scrapTF: !sender.isSelected)
168168
delegate?.didUpdateScrapState(publicCourseId: publicCourseId, isScrapped: !sender.isSelected) /// 코스 발견 UI Update 부분
169-
marathonDelegate?.didMarathonUpdateScrapState(publicCourseId: publicCourseId, isScrapped: !sender.isSelected) // 마라톤 코스 UI Update 부분
169+
marathonDelegate?.didUpdateMarathonScrapState(publicCourseId: publicCourseId, isScrapped: !sender.isSelected) // 마라톤 코스 UI Update 부분
170170

171171
/// print("CourseDetailVC 스크랩 탭🔥publicCourseId=\(publicCourseId), isScrapped은 \(!sender.isSelected) 요렇게 변경 ")
172172
}

Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/MarathonMapCollectionViewCell.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import UIKit
99
import Combine
1010

11-
protocol MarathonCourseDelegate: AnyObject {
12-
func didMarathonUpdateScrapState(publicCourseId: Int, isScrapped: Bool)
11+
protocol MarathonScrapStateDelegate: AnyObject {
12+
func didUpdateMarathonScrapState(publicCourseId: Int, isScrapped: Bool)
1313
}
1414

1515
class CourseSelectionPublisher {
@@ -164,8 +164,8 @@ extension MarathonMapCollectionViewCell: CourseListCVCDeleagte {
164164
}
165165
}
166166

167-
extension MarathonMapCollectionViewCell: MarathonCourseDelegate {
168-
func didMarathonUpdateScrapState(publicCourseId: Int, isScrapped: Bool) {
167+
extension MarathonMapCollectionViewCell: MarathonScrapStateDelegate {
168+
func didUpdateMarathonScrapState(publicCourseId: Int, isScrapped: Bool) {
169169
print("✅ 1. 마라톤 델리게이트 들어오는가 🫶🏻")
170170
if let index = marathonCourseList.firstIndex(where: { $0.id == publicCourseId }) {
171171
marathonCourseList[index].scrap = isScrapped

0 commit comments

Comments
 (0)