From d6137556ba2bde930819d54863e47ba9a3bf377c Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Fri, 4 Apr 2025 10:51:16 +0900 Subject: [PATCH 1/6] =?UTF-8?q?fix/#82:=20=ED=8C=A8=ED=82=A4=EC=A7=80=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xcshareddata/swiftpm/Package.resolved | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Poppool/Poppool.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Poppool/Poppool.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 172ad40b..ea30e126 100644 --- a/Poppool/Poppool.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Poppool/Poppool.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "a264a064b245047631c2da3a5af0624dcc8a9814c5033d1880880c8dbbdc6a20", + "originHash" : "90182ae75bddc149e01f3583353785f437a618e30e1e9df09cabd3c7f3605747", "pins" : [ { "identity" : "alamofire", @@ -33,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher.git", "state" : { - "revision" : "3db26ab625d194c38e68c1a40e43d1bc12743fe0", - "version" : "8.2.0" + "revision" : "4c6b067f96953ee19526e49e4189403a2be21fb3", + "version" : "8.3.1" } }, { @@ -141,8 +141,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/scinfu/SwiftSoup", "state" : { - "revision" : "18ad8b8ff0f03f3c0a5544ffccfa2ea1c051ae6e", - "version" : "2.8.0" + "revision" : "bba848db50462894e7fc0891d018dfecad4ef11e", + "version" : "2.8.7" } }, { From 17ac190254e66315255d98bbc8d162c1f4325c54 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Fri, 4 Apr 2025 13:10:03 +0900 Subject: [PATCH 2/6] =?UTF-8?q?style/#82:=20=EC=BD=94=EB=93=9C=20=EC=8A=A4?= =?UTF-8?q?=ED=83=80=EC=9D=BC=EC=97=90=20=EB=A7=9E=EA=B2=8C=20=EC=83=81?= =?UTF-8?q?=EB=8B=A8=20=EC=A3=BC=EC=84=9D=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/Scene/Detail/DetailController.swift | 7 ------- .../Poppool/Presentation/Scene/Detail/DetailReactor.swift | 7 ------- .../Presentation/Scene/Home/Main/HomeController.swift | 7 ------- .../Poppool/Presentation/Scene/Home/Main/HomeReactor.swift | 7 ------- .../ImageBannerSection/ImageBannerSectionCell.swift | 7 ------- 5 files changed, 35 deletions(-) diff --git a/Poppool/Poppool/Presentation/Scene/Detail/DetailController.swift b/Poppool/Poppool/Presentation/Scene/Detail/DetailController.swift index 75cfd69c..cc6f6183 100644 --- a/Poppool/Poppool/Presentation/Scene/Detail/DetailController.swift +++ b/Poppool/Poppool/Presentation/Scene/Detail/DetailController.swift @@ -1,10 +1,3 @@ -// -// DetailController.swift -// Poppool -// -// Created by SeoJunYoung on 12/9/24. -// - import UIKit import SnapKit diff --git a/Poppool/Poppool/Presentation/Scene/Detail/DetailReactor.swift b/Poppool/Poppool/Presentation/Scene/Detail/DetailReactor.swift index 165a8b7a..c8c38941 100644 --- a/Poppool/Poppool/Presentation/Scene/Detail/DetailReactor.swift +++ b/Poppool/Poppool/Presentation/Scene/Detail/DetailReactor.swift @@ -1,10 +1,3 @@ -// -// DetailReactor.swift -// Poppool -// -// Created by SeoJunYoung on 12/9/24. -// - import UIKit import ReactorKit diff --git a/Poppool/Poppool/Presentation/Scene/Home/Main/HomeController.swift b/Poppool/Poppool/Presentation/Scene/Home/Main/HomeController.swift index 5a507a7d..47c5a576 100644 --- a/Poppool/Poppool/Presentation/Scene/Home/Main/HomeController.swift +++ b/Poppool/Poppool/Presentation/Scene/Home/Main/HomeController.swift @@ -1,10 +1,3 @@ -// -// HomeController.swift -// Poppool -// -// Created by SeoJunYoung on 11/28/24. -// - import UIKit import SnapKit diff --git a/Poppool/Poppool/Presentation/Scene/Home/Main/HomeReactor.swift b/Poppool/Poppool/Presentation/Scene/Home/Main/HomeReactor.swift index d7bdfb8a..6bba6dea 100644 --- a/Poppool/Poppool/Presentation/Scene/Home/Main/HomeReactor.swift +++ b/Poppool/Poppool/Presentation/Scene/Home/Main/HomeReactor.swift @@ -1,10 +1,3 @@ -// -// HomeReactor.swift -// Poppool -// -// Created by SeoJunYoung on 11/28/24. -// - import UIKit import ReactorKit diff --git a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift index 025ec4a9..d72ea488 100644 --- a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift +++ b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift @@ -1,10 +1,3 @@ -// -// ImageBannerSectionCell.swift -// Poppool -// -// Created by SeoJunYoung on 11/28/24. -// - import UIKit import SnapKit From 612fbdef3a5d8db7a7e37ff0bf95e24e703ce88a Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Fri, 4 Apr 2025 13:11:00 +0900 Subject: [PATCH 3/6] =?UTF-8?q?fix/#82:=20=EC=83=81=EB=8B=A8=20=EB=B0=B0?= =?UTF-8?q?=EB=84=88=EC=97=90=20=EC=82=AC=EC=A7=84=EC=9D=B4=20=ED=95=9C?= =?UTF-8?q?=EC=9E=A5=EC=9D=BC=20=EB=95=8C=20=EB=AC=B4=ED=95=9C=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A1=A4=20=EB=B0=8F=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20?= =?UTF-8?q?=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImageBannerSectionCell.swift | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift index d72ea488..0803d4fa 100644 --- a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift +++ b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift @@ -200,16 +200,20 @@ extension ImageBannerSectionCell: Inputable { if imageSection.isEmpty { pageControl.setNumberOfPages(input.imagePaths.count) let datas = zip(input.imagePaths, input.idList) - let backContents = datas.suffix(1) - let frontContents = datas.prefix(1) - imageSection.inputDataList = datas.map { .init(imagePath: $0.0, id: $0.1) } - imageSection.inputDataList.append(contentsOf: frontContents.map { .init(imagePath: $0.0, id: $0.1) }) - imageSection.inputDataList = backContents.map {.init(imagePath: $0.0, id: $0.1) } + imageSection.inputDataList - DispatchQueue.main.async { [weak self] in - self?.contentCollectionView.scrollToItem( - at: .init(row: 1, section: 0), - at: .centeredHorizontally, animated: false - ) + if input.imagePaths.count > 1 { + let backContents = datas.suffix(1) + let frontContents = datas.prefix(1) + imageSection.inputDataList = datas.map { .init(imagePath: $0.0, id: $0.1) } + imageSection.inputDataList.append(contentsOf: frontContents.map { .init(imagePath: $0.0, id: $0.1) }) + imageSection.inputDataList = backContents.map { .init(imagePath: $0.0, id: $0.1) } + imageSection.inputDataList + DispatchQueue.main.async { [weak self] in + self?.contentCollectionView.scrollToItem( + at: .init(row: 1, section: 0), + at: .centeredHorizontally, animated: false + ) + } + } else { + imageSection.inputDataList = datas.map { .init(imagePath: $0.0, id: $0.1) } } } From 68e8644a97ccf767d9117b36d9151d6e64028cac Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Fri, 4 Apr 2025 13:12:27 +0900 Subject: [PATCH 4/6] =?UTF-8?q?fix/#82:=20=EB=B0=B0=EB=84=88=20=EC=82=AC?= =?UTF-8?q?=EC=A7=84=EC=9D=B4=201=EC=9E=A5=EC=9D=BC=20=EB=95=8C=20?= =?UTF-8?q?=EB=8D=B8=EB=A6=AC=EA=B2=8C=EC=9D=B4=ED=8A=B8=20=EB=A9=94?= =?UTF-8?q?=EC=84=9C=EB=93=9C=20=EB=A1=9C=EC=A7=81=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 셀에서 벗어날 때 해당 델리게이트 메서드가 동작 - 하지만 셀에 이미지가 한장일 때 해당 메서드가 out of index를 유발함 - 해당 부분을 guard문으로 처리 --- .../ImageBannerSection/ImageBannerSectionCell.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift index 0803d4fa..3f650e81 100644 --- a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift +++ b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift @@ -263,6 +263,8 @@ extension ImageBannerSectionCell: UICollectionViewDelegate, UICollectionViewData } func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { + guard imageSection.dataCount > 1 else { return } + if currentIndex == 0 { contentCollectionView.scrollToItem( at: .init(row: imageSection.dataCount - 2, section: 0), From 7ce8f3008137f2ab6ab28358cbacb6dea576d7d0 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Fri, 4 Apr 2025 13:13:34 +0900 Subject: [PATCH 5/6] =?UTF-8?q?docs/#82:=20=EC=9D=B4=EC=8A=88=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0=20=EC=A4=91=20=EC=B6=94=EA=B0=80=20=EB=B0=9C=EA=B2=AC?= =?UTF-8?q?=ED=95=9C=20=EB=AC=B8=EC=A0=9C=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 디버깅 중 확인한 부분입니다 - (홈 → 상세) 이동 후에도 홈의 배너 무한스크롤이 계속 작동하는 문제 - 홈의 무한 스크롤이 한번 시작했음에도 계속 다시 시작하는 문제 --- .../ImageBannerSection/ImageBannerSectionCell.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift index 3f650e81..eb9baaca 100644 --- a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift +++ b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift @@ -85,6 +85,8 @@ final class ImageBannerSectionCell: UICollectionViewCell { autoScrollTimer = nil } + // FIXME: (홈 -> 상세) 이동 시 홈의 자동 스크롤이 계속 돌아감. + // FIXME: 또한 오토 스크롤을 한번만 실행하면 되는데, 사진이 넘어갈 때 마다 실행되는것으로 보임 func startAutoScroll(interval: TimeInterval = 3.0) { stopAutoScroll() // 기존 타이머를 중지 stopButton.isHidden = false From 4b8a89bb9198ed5771a3cd603f151f8ff510293d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 5 Apr 2025 03:54:00 +0000 Subject: [PATCH 6/6] style/#82: Apply SwiftLint autocorrect --- .../ImageBannerSection/ImageBannerSectionCell.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift index 56817f73..c6d16cef 100644 --- a/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift +++ b/Poppool/Poppool/Presentation/Scene/Home/Main/View/ImageBannerSection/ImageBannerSection/ImageBannerSectionCell.swift @@ -264,7 +264,7 @@ extension ImageBannerSectionCell: UICollectionViewDelegate, UICollectionViewData func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { guard imageSection.dataCount > 1 else { return } - + if currentIndex == 0 { contentCollectionView.scrollToItem( at: .init(row: imageSection.dataCount - 2, section: 0),