From ceb53e59810a5880671048f6e214ea3a163aaab2 Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Sat, 22 Jul 2023 03:16:30 +0900 Subject: [PATCH 1/9] =?UTF-8?q?[Fix]=20=ED=88=AC=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=EB=B7=B0=20=EB=9D=BC=EB=B2=A8=20=EC=88=98=EC=A0=95(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/Today/Component/LHTodayArticleTitle.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Today/Component/LHTodayArticleTitle.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Today/Component/LHTodayArticleTitle.swift index e1707619..1939f747 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Today/Component/LHTodayArticleTitle.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Today/Component/LHTodayArticleTitle.swift @@ -12,7 +12,7 @@ final class LHTodayArticleTitle: UILabel { var userNickName: String? { didSet { guard let userNickName else { return } - self.text = userNickName + "님," + self.text = userNickName + " 아빠님," } } From eb65f64f10a66ae34c26dad2e414f9ca93ca9b4f Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Sat, 22 Jul 2023 03:17:25 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[Fix]=20=EC=A3=BC=EC=B0=A8=EB=B3=84=20?= =?UTF-8?q?=EC=95=84=ED=8B=B0=ED=81=B4=20=ED=86=A0=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=A9=94=EC=8B=9C=EC=A7=80=20=EB=86=92=EC=9D=B4=EA=B0=92=20?= =?UTF-8?q?=EC=A1=B0=EC=A0=88(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CurriculumListByWeekViewController.swift | 9 +++++++-- .../ViewControllers/CurriculumViewController.swift | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift index 4565c254..4e019ccb 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift @@ -151,14 +151,19 @@ private extension CurriculumListByWeekViewController { @objc func bookmarkButtonTapped(notification: NSNotification) { Task { do { + guard let indexPath = notification.userInfo?["bookmarkCellIndexPath"] as? Int else { return } guard let buttonSelected = notification.userInfo?["bookmarkButtonSelected"] as? Bool else { return } guard let listByWeekDatas else { return } + + + print(indexPath) + print(buttonSelected) try await BookmarkService.shared.postBookmark( BookmarkRequest(articleId: listByWeekDatas.articleData[indexPath].articleId, bookmarkStatus: buttonSelected)) hideLoading() - buttonSelected ? LHToast.show(message: "북마크가 추가되었습니다") : LHToast.show(message: "북마크가 해제되었습니다") + buttonSelected ? LHToast.show(message: "북마크가 추가되었습니다", isTabBar: true) : LHToast.show(message: "북마크가 해제되었습니다", isTabBar: true) } catch { guard let error = error as? NetworkError else { return } handleError(error) @@ -182,7 +187,7 @@ private extension CurriculumListByWeekViewController { ? weekToIndexPathItem + 1 : currentPage + 1 - guard let listByWeekDatas else { return } +// guard let listByWeekDatas else { return } let nextPage = min(pregnancy - 1, nextIndexPathItem) self.currentPage = nextPage } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift index 71db2d83..071cc1bf 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumViewController.swift @@ -277,10 +277,10 @@ extension CurriculumViewController: UITableViewDataSource { } extension CurriculumViewController: UITableViewDelegate{ - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { +// func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { // let curriculumListByWeekViewController = CurriculumListByWeekViewController() // self.navigationController?.pushViewController(curriculumListByWeekViewController, animated: true) - } +// } } extension CurriculumViewController: ViewControllerServiceable { From 05ef2731f63cd9214efb1374ae3935b90c4e3e2d Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Sat, 22 Jul 2023 03:18:05 +0900 Subject: [PATCH 3/9] =?UTF-8?q?[Fix]=20=EC=A3=BC=EC=B0=A8=EB=B3=84=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=EB=B7=B0=20=EC=A3=BC=EC=B0=A8?= =?UTF-8?q?=EB=B0=B1=EA=B7=B8=EB=9D=BC=EC=9A=B4=EB=93=9C=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20contentMode=EC=88=98=EC=A0=95(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift index ef0b6d47..2e6dfd89 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekRowZeroTableViewCell.swift @@ -31,6 +31,7 @@ final class CurriculumArticleByWeekRowZeroTableViewCell: UITableViewCell, TableV let imageView = UIImageView() imageView.backgroundColor = .designSystem(.gray500) imageView.isUserInteractionEnabled = true + imageView.contentMode = .scaleAspectFill return imageView }() From b6ae2ce41d5f57d4a923cf97f7a020fab85936ca Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Sat, 22 Jul 2023 03:19:02 +0900 Subject: [PATCH 4/9] =?UTF-8?q?[Fix]=20=EC=A3=BC=EC=B0=A8=EB=B3=84=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=EB=B7=B0=20=EB=B6=81=EB=A7=88?= =?UTF-8?q?=ED=81=AC=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=A0=84=EB=8B=AC=20?= =?UTF-8?q?indexPath.row=20=EA=B0=92=20=EB=B3=80=EA=B2=BD(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Cells/CurriculumArticleByWeekTableViewCell.swift | 4 ++-- .../Cells/CurriculumListByWeekCollectionViewCell.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift index f02409cc..da6d0185 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift @@ -93,9 +93,9 @@ final class CurriculumArticleByWeekTableViewCell: UITableViewCell, TableViewCell button.setImage(ImageLiterals.BookMark.activeBookmarkSmall, for: .selected) button.addButtonAction { _ in - let indexPath = self.getIndexPath() + guard var indexPath = self.getIndexPath() else { return } NotificationCenter.default.post(name: NSNotification.Name("isArticleBookmarked"), - object: nil, userInfo: ["bookmarkCellIndexPath": indexPath?.row ?? 0, + object: nil, userInfo: ["bookmarkCellIndexPath": indexPath.row-1, "bookmarkButtonSelected": !button.isSelected]) button.isSelected.toggle() } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumListByWeekCollectionViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumListByWeekCollectionViewCell.swift index 9229c45b..bbb17490 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumListByWeekCollectionViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumListByWeekCollectionViewCell.swift @@ -110,7 +110,7 @@ extension CurriculumListByWeekCollectionViewCell: UITableViewDataSource{ if indexPath.row == 0 { let cell = CurriculumArticleByWeekRowZeroTableViewCell.dequeueReusableCell(to: curriculumListByWeekTableView) - guard let weekCount else { return CurriculumTableViewCell() } +// guard let weekCount else { return CurriculumTableViewCell() } cell.inputData = inputData?.week return cell } else { @@ -129,7 +129,7 @@ extension CurriculumListByWeekCollectionViewCell: UITableViewDataSource{ } else { guard let inputData else { return } NotificationCenter.default.post(name: NSNotification.Name("didSelectTableViewCell"), - object: inputData.articleData[indexPath.row - 1].articleId) + object: inputData.articleData[indexPath.row-1].articleId) } } From c285f5aa8bb8f91eafd61f6474f31dcbc4839670 Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Sat, 22 Jul 2023 03:19:21 +0900 Subject: [PATCH 5/9] =?UTF-8?q?[Fix]=20=EC=B1=8C=EB=A6=B0=EC=A7=80?= =?UTF-8?q?=EB=B7=B0=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EB=9D=BC=EB=B2=A8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Challenge/ViewController/ChallengeViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift index 835e2682..8cc0a7c5 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift @@ -57,7 +57,7 @@ final class ChallengeViewController: UIViewController { self.nicknameLabel.text = "\(babyNickname)아빠 님," if let howLongDay = inputData?.howLongDay { - self.challengeDayLabel.text = "\(howLongDay)일째 도전 중" + self.challengeDayLabel.text = "\(howLongDay)일째 도전 중" } self.levelBadge.image = BadgeLevel(rawValue: inputData?.daddyLevel ?? "")?.badgeImage @@ -290,6 +290,7 @@ extension ChallengeViewController: UICollectionViewDataSource { if indexPath.item < tags.count { cell.inputString = tags[indexPath.item] cell.backgroundColor = .designSystem(.background) + cell.whiteTextColor = .designSystem(.white) } else { cell.inputString = "\(indexPath.section + indexPath.row + 1)" cell.backgroundColor = .designSystem(.gray1000) From 3f7d845496bdb65b54a83ff16e3b51fea48614fa Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Sat, 22 Jul 2023 03:20:10 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[Fix]=20=EC=B1=8C=EB=A6=B0=EC=A7=80?= =?UTF-8?q?=EB=B7=B0=20=ED=85=8D=EC=8A=A4=ED=8A=B8=EC=83=89=EA=B9=94=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChallengeDayCheckCollectionViewCollectionViewCell.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/Cells/ChallengeDayCheckCollectionViewCollectionViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/Cells/ChallengeDayCheckCollectionViewCollectionViewCell.swift index 889a0ebd..20637a67 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/Cells/ChallengeDayCheckCollectionViewCollectionViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/Cells/ChallengeDayCheckCollectionViewCollectionViewCell.swift @@ -20,6 +20,12 @@ final class ChallengeDayCheckCollectionViewCollectionViewCell: UICollectionViewC } } + var whiteTextColor: UIColor? { + didSet { + countLabel.textColor = whiteTextColor + } + } + private let countLabel: UILabel = { let label = UILabel() label.textAlignment = .center From e85db36edef7142045c25b10c1252f5174fe3a0d Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Sat, 22 Jul 2023 03:20:59 +0900 Subject: [PATCH 7/9] =?UTF-8?q?[Fix]=20=EB=B6=81=EB=A7=88=ED=81=AC?= =?UTF-8?q?=EB=B7=B0=EC=97=90=EC=84=9C=20=EC=95=84=ED=8B=B0=ED=81=B4=20?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20=EC=95=84=ED=8B=B0=ED=81=B4?= =?UTF-8?q?=EB=94=94=ED=85=8C=EC=9D=BC=EB=B7=B0=EB=A1=9C=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookMark/ViewControllers/BookmarkViewController.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/ViewControllers/BookmarkViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/ViewControllers/BookmarkViewController.swift index 5d25fd1f..a0b0b77b 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/ViewControllers/BookmarkViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/ViewControllers/BookmarkViewController.swift @@ -137,6 +137,7 @@ extension BookmarkViewController: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { if indexPath.section == 0 { let cell = BookmarkDetailCollectionViewCell.dequeueReusableCell(to: collectionView, indexPath: indexPath) + cell.inputData = bookmarkAppData return cell } else { let cell = BookmarkListCollectionViewCell.dequeueReusableCell(to: collectionView, indexPath: indexPath) @@ -178,3 +179,9 @@ extension BookmarkViewController: UICollectionViewDelegateFlowLayout { section == 1 ? 20 : CGFloat() } } + +extension BookmarkViewController: UICollectionViewDelegate { + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + self.presentArticleDetailFullScreen(articleID: bookmarkList[indexPath.item].articleID) + } +} From 1446c9e16c33c5b3a2a5d911a0c80ff9555382d3 Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Sat, 22 Jul 2023 03:21:23 +0900 Subject: [PATCH 8/9] =?UTF-8?q?[Fix]=20=EB=B6=81=EB=A7=88=ED=81=AC?= =?UTF-8?q?=EB=B7=B0=EC=97=90=EC=84=9C=20=EC=9C=A0=EC=A0=80=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EB=B0=9B=EC=95=84=EC=98=A4=EA=B8=B0(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookMark/Cells/BookmarkDetailCollectionViewCell.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/Cells/BookmarkDetailCollectionViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/Cells/BookmarkDetailCollectionViewCell.swift index d3b75fd2..4d7e2631 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/Cells/BookmarkDetailCollectionViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/Cells/BookmarkDetailCollectionViewCell.swift @@ -24,9 +24,10 @@ final class BookmarkDetailCollectionViewCell: UICollectionViewCell, CollectionVi return label }() - var inputData: DummyModel? { + var inputData: BookmarkAppData? { didSet { - /// action + guard let inputData else { return } + bookmarkDetailLabel.text = inputData.nickName + " 아빠님이\n보관한 아티클이에요" } } From 1be6ede147d08e98261cd2eb3b31f31535c67a39 Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Sat, 22 Jul 2023 03:22:26 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[Fix]=20ArticleListByCategory=EB=B7=B0=20?= =?UTF-8?q?=ED=83=AD=EB=B0=94=20=EB=86=92=EC=9D=B4=20=EC=A1=B0=EC=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewControllers/ArticleListByCategoryViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift index 20932e0b..4287326d 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift @@ -102,9 +102,9 @@ private extension ArticleListByCategoryViewController { guard let indexPath = notification.userInfo?["bookmarkCellIndexPath"] as? Int else { return } guard let buttonSelected = notification.userInfo?["bookmarkButtonSelected"] as? Bool else { return } - try await BookmarkService.shared.postBookmark(BookmarkRequest(articleId: articleListData[indexPath].articleId, + try await BookmarkService.shared.postBookmark(BookmarkRequest(articleId: articleListData[indexPath+1].articleId, bookmarkStatus: buttonSelected)) - buttonSelected ? LHToast.show(message: "북마크에 추가되었습니다") : LHToast.show(message: "북마크에 해제되었습니다") + buttonSelected ? LHToast.show(message: "북마크에 추가되었습니다", isTabBar: true) : LHToast.show(message: "북마크에 해제되었습니다", isTabBar: true) } catch { guard let error = error as? NetworkError else { return } handleError(error)