-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix] 소식 탭 경기 일정 화면 변경 대응 #284
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ struct MockOverviewUseCaseImpl: OverviewUseCase { | |
|
|
||
| private var randomDelaySecond: Double { .random(in: 0.3...1.0) } | ||
|
|
||
| private let lckTeams: [LCKTeam] = [.t1, .gen, .hle, .dk, .kt, .ns, .drx, .bro, .bfx, .dnf] | ||
| // 주의: 팀명 배열은 createMockGameSchedules() 내부에서만 정의해 사용합니다. | ||
|
|
||
| func fetchGameCategory() -> AnyPublisher<String, WableError> { | ||
| return .just("2025 LCK SPRING") | ||
|
|
@@ -100,22 +100,29 @@ struct MockOverviewUseCaseImpl: OverviewUseCase { | |
| } | ||
|
|
||
| private func createMockGameSchedules() -> AnyPublisher<[GameSchedule], WableError> { | ||
| let teamNames: [String] = [ | ||
| "T1", "GEN", "HLE", "DK", "KT", "NS", "DRX", "BRO", "BFX", "DNF", | ||
| "VKS", "AL", "BLG", "CFO", "FLY", "FNC", "G2", "IG", "MKOI", "PSG", | ||
| "TES", "TSW", "100T", "TBD" | ||
| ] | ||
|
Comment on lines
+103
to
+107
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 팀 개수가 홀수일 경우를 대비하세요.
다음 diff를 적용하여 안전장치를 추가하세요: private func createMockGameSchedules() -> AnyPublisher<[GameSchedule], WableError> {
let teamNames: [String] = [
"T1", "GEN", "HLE", "DK", "KT", "NS", "DRX", "BRO", "BFX", "DNF",
"VKS", "AL", "BLG", "CFO", "FLY", "FNC", "G2", "IG", "MKOI", "PSG",
"TES", "TSW", "100T", "TBD"
]
+
+ // 팀 개수가 홀수이면 마지막 팀 제외
+ let validTeamCount = teamNames.count - (teamNames.count % 2)
+
var mockGameSchedules: [GameSchedule] = []그리고 line 114를 다음과 같이 수정하세요: - let rotatedTeams: [String] = (0..<teamNames.count).map { teamNames[($0 + dayOffset) % teamNames.count] }
+ let rotatedTeams: [String] = (0..<validTeamCount).map { teamNames[($0 + dayOffset) % teamNames.count] }
🤖 Prompt for AI Agents |
||
| var mockGameSchedules: [GameSchedule] = [] | ||
|
|
||
| for dayOffset in 0...6 { | ||
| let date = Calendar.current.date(byAdding: .day, value: dayOffset, to: Date())! | ||
| var games: [Game] = [] | ||
|
|
||
| for index in 0...4 { | ||
| let homeTeamIndex = index * 2 % lckTeams.count | ||
| let awayTeamIndex = (index * 2 + 1) % lckTeams.count | ||
|
|
||
| let rotatedTeams: [String] = (0..<teamNames.count).map { teamNames[($0 + dayOffset) % teamNames.count] } | ||
| for pairIndex in stride(from: 0, to: rotatedTeams.count, by: 2) { | ||
| let homeTeam = rotatedTeams[pairIndex] | ||
| let awayTeam = rotatedTeams[pairIndex + 1] | ||
|
|
||
| let gameNumber = pairIndex / 2 | ||
| let game = Game( | ||
| date: date, | ||
| homeTeam: lckTeams[homeTeamIndex].rawValue, | ||
| homeScore: index * 2 + 1, | ||
| awayTeam: lckTeams[awayTeamIndex].rawValue, | ||
| awayScore: index * 2 + 2, | ||
| homeTeam: homeTeam, | ||
| homeScore: gameNumber * 2 + 1, | ||
| awayTeam: awayTeam, | ||
| awayScore: gameNumber * 2 + 2, | ||
| status: .scheduled | ||
| ) | ||
| games.append(game) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -56,6 +56,11 @@ final class GameScheduleCell: UICollectionViewCell { | |||||||||||||||||||||||
| $0.attributedText = "0".pretendardString(with: .head0) | ||||||||||||||||||||||||
| $0.textColor = .wableBlack | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| private let versusLabel = UILabel().then { | ||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이거 다크모드에 따라서 라벨이 안보이는 경우가 있어서 색 할당해주는 게 좋아보입니닷
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 수정했습니다! |
||||||||||||||||||||||||
| $0.attributedText = "VS".pretendardString(with: .head1) | ||||||||||||||||||||||||
| $0.textColor = .wableBlack | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| private let awayTeamNameLabel = UILabel().then { | ||||||||||||||||||||||||
| $0.attributedText = "TBD".pretendardString(with: .body3) | ||||||||||||||||||||||||
|
|
@@ -133,9 +138,10 @@ private extension GameScheduleCell { | |||||||||||||||||||||||
| scoreView.addSubviews( | ||||||||||||||||||||||||
| homeTeamLogoImageView, | ||||||||||||||||||||||||
| homeTeamNameLabel, | ||||||||||||||||||||||||
| homeTeamScoreLabel, | ||||||||||||||||||||||||
| colonImageView, | ||||||||||||||||||||||||
| awayTeamScoreLabel, | ||||||||||||||||||||||||
| // homeTeamScoreLabel, | ||||||||||||||||||||||||
| // colonImageView, | ||||||||||||||||||||||||
| // awayTeamScoreLabel, | ||||||||||||||||||||||||
| versusLabel, | ||||||||||||||||||||||||
|
Comment on lines
+141
to
+144
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major 주석 처리된 코드를 제거하세요. 뷰 계층 구성에서 주석 처리된 레이블들(homeTeamScoreLabel, colonImageView, awayTeamScoreLabel)을 완전히 제거하여 코드를 정리하세요. 다음 diff를 적용하세요: scoreView.addSubviews(
homeTeamLogoImageView,
homeTeamNameLabel,
- // homeTeamScoreLabel,
- // colonImageView,
- // awayTeamScoreLabel,
versusLabel,
awayTeamNameLabel,
awayTeamLogoImageView
)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
| awayTeamNameLabel, | ||||||||||||||||||||||||
| awayTeamLogoImageView | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
|
|
@@ -177,19 +183,24 @@ private extension GameScheduleCell { | |||||||||||||||||||||||
| make.leading.equalTo(homeTeamLogoImageView.snp.trailing).offset(8) | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| homeTeamScoreLabel.snp.makeConstraints { make in | ||||||||||||||||||||||||
| make.centerY.equalToSuperview() | ||||||||||||||||||||||||
| make.trailing.equalTo(colonImageView.snp.leading).offset(-24) | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| colonImageView.snp.makeConstraints { make in | ||||||||||||||||||||||||
| /// 점수 레이블 숨김 처리로 인한 주석 처리 | ||||||||||||||||||||||||
| // homeTeamScoreLabel.snp.makeConstraints { make in | ||||||||||||||||||||||||
| // make.centerY.equalToSuperview() | ||||||||||||||||||||||||
| // make.trailing.equalTo(colonImageView.snp.leading).offset(-24) | ||||||||||||||||||||||||
| // } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // colonImageView.snp.makeConstraints { make in | ||||||||||||||||||||||||
| // make.center.equalToSuperview() | ||||||||||||||||||||||||
| // make.adjustedWidthEqualTo(4) | ||||||||||||||||||||||||
| // } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // awayTeamScoreLabel.snp.makeConstraints { make in | ||||||||||||||||||||||||
| // make.centerY.equalToSuperview() | ||||||||||||||||||||||||
| // make.leading.equalTo(colonImageView.snp.trailing).offset(24) | ||||||||||||||||||||||||
| // } | ||||||||||||||||||||||||
|
Comment on lines
+186
to
+200
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major 주석 처리된 제약조건 코드를 제거하세요. 주석 처리된 제약조건 코드는 더 이상 필요하지 않으며, 코드를 복잡하게 만듭니다. SwiftLint도 line 185의 고아 문서 주석에 대해 경고하고 있습니다. 다음 diff를 적용하여 주석 처리된 코드를 제거하세요: homeTeamNameLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.leading.equalTo(homeTeamLogoImageView.snp.trailing).offset(8)
}
- /// 점수 레이블 숨김 처리로 인한 주석 처리
- // homeTeamScoreLabel.snp.makeConstraints { make in
- // make.centerY.equalToSuperview()
- // make.trailing.equalTo(colonImageView.snp.leading).offset(-24)
- // }
-
- // colonImageView.snp.makeConstraints { make in
- // make.center.equalToSuperview()
- // make.adjustedWidthEqualTo(4)
- // }
-
- // awayTeamScoreLabel.snp.makeConstraints { make in
- // make.centerY.equalToSuperview()
- // make.leading.equalTo(colonImageView.snp.trailing).offset(24)
- // }
-
versusLabel.snp.makeConstraints { make in
make.center.equalToSuperview()
}🧰 Tools🪛 SwiftLint (0.57.0)[Warning] 185-185: A doc comment should be attached to a declaration (orphaned_doc_comment) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| versusLabel.snp.makeConstraints { make in | ||||||||||||||||||||||||
| make.center.equalToSuperview() | ||||||||||||||||||||||||
| make.adjustedWidthEqualTo(4) | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| awayTeamScoreLabel.snp.makeConstraints { make in | ||||||||||||||||||||||||
| make.centerY.equalToSuperview() | ||||||||||||||||||||||||
| make.leading.equalTo(colonImageView.snp.trailing).offset(24) | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| awayTeamNameLabel.snp.makeConstraints { make in | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "100t.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "100t@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "100t@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "fox.png", | ||
| "filename" : "al.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "fox@2x.png", | ||
| "filename" : "al@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "fox@3x.png", | ||
| "filename" : "al@3x.png", | ||
|
Comment on lines
+4
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain팀 이름 변경이 일관되게 처리되었는지 확인하세요. 파일명이 다음 스크립트로 🏁 Script executed: #!/bin/bash
# fox 에셋에 대한 남은 참조 확인
rg -i "fox" --type swift -C 2
fd "fox" --type fLength of output: 212 Fox 에셋 제거/이름 변경 필요
🤖 Prompt for AI Agents |
||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "cfo.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "cfo@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "cfo@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "fly.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "fly@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "fly@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "fnc.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "fnc@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "fnc@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "g2.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "g2@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "g2@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "ig.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "ig@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "ig@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "mkoi.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "mkoi@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "mkoi@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "psg.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "psg@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "psg@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "tes.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "tes@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "tes@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "tsw.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "tsw@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "tsw@3x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
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.
mock을 붙이신 이유가 있나요 ??
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.
저 메서드는 Mock 유즈케이스 객체의 내용입니다.