From 079359e1e24e856540be38b87e33b24d696c5802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Fri, 1 Sep 2023 00:47:02 +0900 Subject: [PATCH 01/12] =?UTF-8?q?Fix=20[#243]=20=EC=83=81=EC=A0=90=20?= =?UTF-8?q?=EA=B5=AC=EB=8F=85=20=EC=97=AC=EB=B6=80=20=EC=8B=9C=EC=A0=90=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Payment/ViewController/PaymentPlusViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Payment/ViewController/PaymentPlusViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Payment/ViewController/PaymentPlusViewController.swift index 794eb74e..305d83e2 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Payment/ViewController/PaymentPlusViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Payment/ViewController/PaymentPlusViewController.swift @@ -60,7 +60,6 @@ final class PaymentPlusViewController: BaseViewController { setDelegate() getProducts() setNotification() - purchaseSubscribeNeed() } override func viewWillAppear(_ animated: Bool) { @@ -68,6 +67,7 @@ final class PaymentPlusViewController: BaseViewController { tabBarController?.tabBar.isHidden = true paymentPlusView.paymentView.bannerTimer() + purchaseSubscribeNeed() } func getProducts() { From 9fedacff8277d78f4d0513811e998e4151203ce0 Mon Sep 17 00:00:00 2001 From: Zoe Date: Sat, 2 Sep 2023 14:33:24 +0900 Subject: [PATCH 02/12] =?UTF-8?q?Fix=20=ED=86=A0=ED=81=B0=20=EC=9E=AC?= =?UTF-8?q?=EB=B0=9C=EA=B8=89=20Body=EA=B0=92=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YELLO-iOS/Application/AppDelegate.swift | 22 ++++++++++--------- .../Network/Base/MyRequestInterceptor.swift | 5 +---- .../Onboarding/Router/OnboardingTarget.swift | 8 +++---- .../Service/OnboardingService.swift | 10 ++++----- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Application/AppDelegate.swift b/YELLO-iOS/YELLO-iOS/Application/AppDelegate.swift index b427460a..dcac4dc7 100644 --- a/YELLO-iOS/YELLO-iOS/Application/AppDelegate.swift +++ b/YELLO-iOS/YELLO-iOS/Application/AppDelegate.swift @@ -115,19 +115,21 @@ extension AppDelegate: MessagingDelegate { print("FirebaseMessaging") guard let fcmToken = fcmToken else { return } let deviceToken:[String: String] = ["token": fcmToken] - - let requestDTO = DeviceTokenRefreshRequestDTO(deviceToken: fcmToken) - NetworkService.shared.onboardingService.putRefreshDeviceToken(requsetDTO: requestDTO) { result in - switch result { - case .success(let data): - if data.status == 200 || data.status == 201 { - User.shared.deviceToken = fcmToken + if fcmToken != User.shared.deviceToken { + let requestDTO = DeviceTokenRefreshRequestDTO(deviceToken: fcmToken) + NetworkService.shared.onboardingService.putRefreshDeviceToken(requsetDTO: requestDTO) { result in + switch result { + case .success(let data): + if data.status == 200 || data.status == 201 { + User.shared.deviceToken = fcmToken + print("Device token 재발급 완료:", deviceToken) + } + default: + print("deviceToken 재발급 오류") } - default: - print("deviceToken 재발급 오류") } } User.shared.deviceToken = fcmToken - print("Device token 재발급 완료:", deviceToken) + print("Device token:", deviceToken) } } diff --git a/YELLO-iOS/YELLO-iOS/Network/Base/MyRequestInterceptor.swift b/YELLO-iOS/YELLO-iOS/Network/Base/MyRequestInterceptor.swift index 7e4c259a..e43af5ff 100644 --- a/YELLO-iOS/YELLO-iOS/Network/Base/MyRequestInterceptor.swift +++ b/YELLO-iOS/YELLO-iOS/Network/Base/MyRequestInterceptor.swift @@ -51,11 +51,8 @@ final class MyRequestInterceptor: RequestInterceptor { print("재발급 출발") if retryCount < maxRetryCount { - let accessToken = KeychainHandler.shared.accessToken - let refreshToken = KeychainHandler.shared.refreshToken - let dto = TokenRefreshRequestDTO(accessToken: "Bearer \(accessToken)", refreshToken: "Bearer \(refreshToken)") - NetworkService.shared.onboardingService.postRefreshToken(requsetDTO: dto) { result in + NetworkService.shared.onboardingService.postRefreshToken() { result in switch result { case .success(let data): guard let decodedData = data.data else { return } diff --git a/YELLO-iOS/YELLO-iOS/Network/Onboarding/Router/OnboardingTarget.swift b/YELLO-iOS/YELLO-iOS/Network/Onboarding/Router/OnboardingTarget.swift index 55dc0553..61a4596a 100644 --- a/YELLO-iOS/YELLO-iOS/Network/Onboarding/Router/OnboardingTarget.swift +++ b/YELLO-iOS/YELLO-iOS/Network/Onboarding/Router/OnboardingTarget.swift @@ -16,7 +16,7 @@ enum OnboardingTarget { case getCheckDuplicate(_ dto: IdValidRequestQueryDTO) /// 아이디 중복 확인 case postFirendsList( _ query: JoinedFriendsRequestQueryDTO, _ dto: JoinedFriendsRequestDTO) /// 가입한 친구 목록 불러오기 case postUserInfo(_ dto: SignUpRequestDTO ) /// 회원가입 - case postRefreshToken(_ dto: TokenRefreshRequestDTO) + case postRefreshToken case putDeviceToken(_ dto: DeviceTokenRefreshRequestDTO) } @@ -36,7 +36,7 @@ extension OnboardingTarget: TargetType { case .postUserInfo: return .unauthorization case .postRefreshToken: - return .unauthorization + return .authorization case .putDeviceToken: return .authorization } @@ -119,8 +119,8 @@ extension OnboardingTarget: TargetType { return .requestQuery(dto) case .postFirendsList(let query, let dto): return .requestQueryWithBody(query, bodyParameter: dto) - case .postRefreshToken(let dto): - return .requestWithBody(dto) + case .postRefreshToken: + return .requestPlain case .putDeviceToken(let dto): return .requestWithBody(dto) } diff --git a/YELLO-iOS/YELLO-iOS/Network/Onboarding/Service/OnboardingService.swift b/YELLO-iOS/YELLO-iOS/Network/Onboarding/Service/OnboardingService.swift index 160c77c2..5b6be854 100644 --- a/YELLO-iOS/YELLO-iOS/Network/Onboarding/Service/OnboardingService.swift +++ b/YELLO-iOS/YELLO-iOS/Network/Onboarding/Service/OnboardingService.swift @@ -16,8 +16,8 @@ protocol OnboardingServiceProtocol { func getSchoolList(queryDTO: SchoolSearchRequestQueryDTO, completion: @escaping (NetworkResult>) -> Void) func getMajorList(queryDTO: MajorSearchRequestQueryDTO, completion: @escaping (NetworkResult>) -> Void) func postJoinedFriends(queryDTO: JoinedFriendsRequestQueryDTO, requestDTO: JoinedFriendsRequestDTO, completion: @escaping (NetworkResult>) -> Void) - func postRefreshToken(requsetDTO: TokenRefreshRequestDTO, completion: @escaping (NetworkResult>) -> Void) - func putRefreshDeviceToken(requsetDTO: DeviceTokenRefreshRequestDTO, completion: @escaping (NetworkResult>) ->Void) + func postRefreshToken(completion: @escaping (NetworkResult>) -> Void) + func putRefreshDeviceToken(requsetDTO: DeviceTokenRefreshRequestDTO, completion: @escaping (NetworkResult>) -> Void) } @@ -47,11 +47,11 @@ final class OnboardingService: APIRequestLoader, OnboardingSer fetchData(target: .postFirendsList(queryDTO, requestDTO), responseData: BaseResponse.self, completion: completion) } - func postRefreshToken(requsetDTO: TokenRefreshRequestDTO, completion: @escaping (NetworkResult>)->Void) { - fetchData(target: .postRefreshToken(requsetDTO), responseData: BaseResponse.self, completion: completion) + func postRefreshToken(completion: @escaping (NetworkResult>) -> Void) { + fetchData(target: .postRefreshToken, responseData: BaseResponse.self, completion: completion) } - func putRefreshDeviceToken(requsetDTO: DeviceTokenRefreshRequestDTO, completion: @escaping (NetworkResult>)->Void) { + func putRefreshDeviceToken(requsetDTO: DeviceTokenRefreshRequestDTO, completion: @escaping (NetworkResult>) -> Void) { fetchData(target: .putDeviceToken(requsetDTO), responseData: BaseResponse.self, completion: completion) } From 729ab0220cfd58767459a71ea271c24a91d109d9 Mon Sep 17 00:00:00 2001 From: heejoo Date: Sat, 2 Sep 2023 15:44:29 +0900 Subject: [PATCH 03/12] =?UTF-8?q?[Fix]=20=EC=B9=9C=EA=B5=AC=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20error=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Main/ViewController/ProfileViewController.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Main/ViewController/ProfileViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Main/ViewController/ProfileViewController.swift index 40aebda2..209ba30e 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Main/ViewController/ProfileViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Main/ViewController/ProfileViewController.swift @@ -116,9 +116,12 @@ extension ProfileViewController: HandleDeleteFriendButtonDelegate { func deleteFriendButtonTapped() { profileView.showToast(message: profileView.myProfileFriendModelDummy[profileView.indexNumber].name + StringLiterals.Profile.Friend.toastMessage) - friendProfileViewController.friendProfileView.profileDeleteFriend(id: profileView.myProfileFriendModelDummy[profileView.indexNumber].userId) - bottomSheetViewController.friendProfileView.profileDeleteFriend(id: profileView.myProfileFriendModelDummy[profileView.indexNumber].userId) - + if #available(iOS 15.0, *) { + friendProfileViewController.friendProfileView.profileDeleteFriend(id: profileView.myProfileFriendModelDummy[profileView.indexNumber].userId) + } else { + bottomSheetViewController.friendProfileView.profileDeleteFriend(id: profileView.myProfileFriendModelDummy[profileView.indexNumber].userId) + } + // 삭제 작업이 적용된 후에 UI 업데이트 DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { self.profileView.myProfileFriendModelDummy.remove(at: self.profileView.indexNumber) From 2f7efc6729aaa6d2b4dd7bb05e616f763a79b1fc Mon Sep 17 00:00:00 2001 From: chaentopia Date: Sat, 2 Sep 2023 20:20:10 +0900 Subject: [PATCH 04/12] Chore Version Update --- YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj b/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj index 688149ed..a971fe6a 100644 --- a/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj +++ b/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj @@ -2422,7 +2422,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.4.2; PRODUCT_BUNDLE_IDENTIFIER = YELLO.iOS.dev; PRODUCT_NAME = "$(Yello_Bundle_Name)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2583,7 +2583,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.4.2; PRODUCT_BUNDLE_IDENTIFIER = YELLO.iOS; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2623,7 +2623,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.4.2; PRODUCT_BUNDLE_IDENTIFIER = YELLO.iOS; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; From c6276d82c5db436d33b0c18adac229e1aed2bdf5 Mon Sep 17 00:00:00 2001 From: heejoo Date: Tue, 5 Sep 2023 19:11:01 +0900 Subject: [PATCH 05/12] =?UTF-8?q?[Fix]=20Timer=20QA=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VotingTimer/VotingTimerViewController.swift | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift index 32b86dac..75c9765e 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift @@ -307,10 +307,20 @@ extension VotingTimerViewController { result in switch result { case .success(let data): + let status = data.status guard let data = data.data else { return } - if data.isPossible { - let viewController = VotingStartViewController() - viewController.myPoint = String(data.point) + if status == 200 { + if data.isPossible { + let viewController = VotingStartViewController() + viewController.myPoint = String(data.point) + UIView.transition(with: self.navigationController?.view ?? UIView(), duration: 0.001, options: .transitionCrossDissolve, animations: { + // 전환 시 스르륵 바뀌는 애니메이션 적용 + self.navigationController?.pushViewController(viewController, animated: false) + }) + } + } + if status == 400 { + let viewController = VotingLockedViewController() UIView.transition(with: self.navigationController?.view ?? UIView(), duration: 0.001, options: .transitionCrossDissolve, animations: { // 전환 시 스르륵 바뀌는 애니메이션 적용 self.navigationController?.pushViewController(viewController, animated: false) From 12563c5dceffdc31724db3e97a69d8741e75935d Mon Sep 17 00:00:00 2001 From: heejoo Date: Tue, 5 Sep 2023 19:24:18 +0900 Subject: [PATCH 06/12] =?UTF-8?q?[Chore]=20guard=20let=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VotingTimerViewController.swift | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift index 75c9765e..1b1f4c74 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift @@ -308,7 +308,17 @@ extension VotingTimerViewController { switch result { case .success(let data): let status = data.status - guard let data = data.data else { return } + guard let data = data.data else { + if status == 400 { + print("hiiiiiiiii") + let viewController = VotingLockedViewController() + UIView.transition(with: self.navigationController?.view ?? UIView(), duration: 0.001, options: .transitionCrossDissolve, animations: { + // 전환 시 스르륵 바뀌는 애니메이션 적용 + self.navigationController?.pushViewController(viewController, animated: false) + }) + } + return + } if status == 200 { if data.isPossible { let viewController = VotingStartViewController() @@ -319,13 +329,6 @@ extension VotingTimerViewController { }) } } - if status == 400 { - let viewController = VotingLockedViewController() - UIView.transition(with: self.navigationController?.view ?? UIView(), duration: 0.001, options: .transitionCrossDissolve, animations: { - // 전환 시 스르륵 바뀌는 애니메이션 적용 - self.navigationController?.pushViewController(viewController, animated: false) - }) - } self.myPoint = data.point self.originView.topOfMyPoint.setTextWithLineHeight(text: String(self.myPoint), lineHeight: 24) default: From a6ce4a52eb34dde23cc7b48ef266e0310b6b8adf Mon Sep 17 00:00:00 2001 From: heejoo Date: Tue, 5 Sep 2023 19:24:45 +0900 Subject: [PATCH 07/12] =?UTF-8?q?[Chore]=20print=EB=AC=B8=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Voting/VotingTimer/VotingTimerViewController.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift index 1b1f4c74..1096e921 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Voting/VotingTimer/VotingTimerViewController.swift @@ -310,7 +310,6 @@ extension VotingTimerViewController { let status = data.status guard let data = data.data else { if status == 400 { - print("hiiiiiiiii") let viewController = VotingLockedViewController() UIView.transition(with: self.navigationController?.view ?? UIView(), duration: 0.001, options: .transitionCrossDissolve, animations: { // 전환 시 스르륵 바뀌는 애니메이션 적용 From ebadd0e750fd9a9a9a5998bba9eee42a749a2e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Wed, 6 Sep 2023 23:41:09 +0900 Subject: [PATCH 08/12] =?UTF-8?q?Chore=20[#246]=20=EB=B6=88=ED=95=84?= =?UTF-8?q?=EC=9A=94=ED=95=9C=20=EC=A3=BC=EC=84=9D=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YELLO-iOS/YELLO-iOS/Network/Search/Router/SearchTarget.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YELLO-iOS/YELLO-iOS/Network/Search/Router/SearchTarget.swift b/YELLO-iOS/YELLO-iOS/Network/Search/Router/SearchTarget.swift index a85b80d7..5cd6dc07 100644 --- a/YELLO-iOS/YELLO-iOS/Network/Search/Router/SearchTarget.swift +++ b/YELLO-iOS/YELLO-iOS/Network/Search/Router/SearchTarget.swift @@ -10,7 +10,7 @@ import Alamofire @frozen enum SearchTarget { - case friendSearch(_ dto: FriendSearchRequestQueryDTO) /// 학교 검색 + case friendSearch(_ dto: FriendSearchRequestQueryDTO) } extension SearchTarget: TargetType { From 95862080578b8d3a675ba4e0fbc4a0385a231e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Thu, 7 Sep 2023 00:25:25 +0900 Subject: [PATCH 09/12] =?UTF-8?q?Fix=20[#246]=20=EC=B9=9C=EA=B5=AC=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=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 텍스트 바뀔 때 서버 통신 시 반영 안되는 이슈였음 --- .../Search/ViewController/FriendSearchViewController.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift index 8b217c4a..b5007fc6 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift @@ -61,7 +61,7 @@ final class FriendSearchViewController: BaseViewController { friendSearchView.friendSearchTextfield.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged) } - func searchFriend(_ word: String) { + func searchFriend(_ word: String?) { if fetchingMore { // 이미 데이터를 가져오는 중이면 리턴 return } @@ -70,7 +70,7 @@ final class FriendSearchViewController: BaseViewController { return } - let queryDTO: FriendSearchRequestQueryDTO = FriendSearchRequestQueryDTO(keyword: word, page: pageCount) + let queryDTO: FriendSearchRequestQueryDTO = FriendSearchRequestQueryDTO(keyword: word ?? "", page: pageCount) self.fetchingMore = true if !self.isScroll { @@ -96,7 +96,7 @@ final class FriendSearchViewController: BaseViewController { self.totalItemCount = data.totalCount if data.totalCount == 0 { - if word.isEmpty { + if word == nil { self.allFriend.removeAll() self.friendSearchView.noResultView.isHidden = true self.friendSearchView.loadingStackView.isHidden = true @@ -159,6 +159,7 @@ extension FriendSearchViewController: UITextFieldDelegate { @objc func textFieldDidChange(_ textField: UITextField) { guard let text = textField.text else { return } isFinishPaging = false + fetchingMore = false pageCount = 0 allFriend.removeAll() searchFriend(text) From 83e95e9de2a70585451f2cf6ac3f4a42b0028bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Thu, 7 Sep 2023 00:43:52 +0900 Subject: [PATCH 10/12] =?UTF-8?q?Fix=20[#246]=20=EC=B9=9C=EA=B5=AC=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=EC=97=86=EC=9D=84=20=EB=95=8C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Search/ViewController/FriendSearchViewController.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift index b5007fc6..bc0cb7ce 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift @@ -96,15 +96,18 @@ final class FriendSearchViewController: BaseViewController { self.totalItemCount = data.totalCount if data.totalCount == 0 { - if word == nil { + if word == "" { + // 전부 지웠을 때 self.allFriend.removeAll() self.friendSearchView.noResultView.isHidden = true self.friendSearchView.loadingStackView.isHidden = true } else { + // 검색 결과 없을 때 self.allFriend.removeAll() self.friendSearchView.noResultView.isHidden = false } } else { + // 검색 결과 있을 떄 self.friendSearchView.noResultView.isHidden = true } From 2b2bfe303c971b2fc2c05969d319cafba3370748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Thu, 7 Sep 2023 00:49:50 +0900 Subject: [PATCH 11/12] =?UTF-8?q?Fix=20[#246]=20=EC=B9=9C=EA=B5=AC=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=EC=A4=91=EB=B3=B5=20=EB=AA=A8=EB=8D=B8=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Search/ViewController/FriendSearchViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift index bc0cb7ce..c3e1cae0 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/Search/ViewController/FriendSearchViewController.swift @@ -85,7 +85,12 @@ final class FriendSearchViewController: BaseViewController { switch result { case .success(let data): guard let data = data.data else { return } - self.allFriend.append(contentsOf: data.friendList) + // 중복되는 모델 필터 처리 + let uniqueFriendModels = data.friendList.filter { model in + !self.allFriend.contains { $0.id == model.id } + } + + self.allFriend.append(contentsOf: uniqueFriendModels) self.fetchingMore = false if !self.isScroll { From 631d4043b8e0f92a285dd8e65c0b6a614b1cbdda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Thu, 7 Sep 2023 01:19:59 +0900 Subject: [PATCH 12/12] =?UTF-8?q?Chore=20[#246]=20=EC=B9=9C=EA=B5=AC=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20target=20=EB=8B=A8=EC=96=B4=20=ED=86=B5?= =?UTF-8?q?=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YELLO-iOS/Network/Search/Router/SearchTarget.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Network/Search/Router/SearchTarget.swift b/YELLO-iOS/YELLO-iOS/Network/Search/Router/SearchTarget.swift index 5cd6dc07..93bc5e16 100644 --- a/YELLO-iOS/YELLO-iOS/Network/Search/Router/SearchTarget.swift +++ b/YELLO-iOS/YELLO-iOS/Network/Search/Router/SearchTarget.swift @@ -10,7 +10,7 @@ import Alamofire @frozen enum SearchTarget { - case friendSearch(_ dto: FriendSearchRequestQueryDTO) + case friendSearch(_ query: FriendSearchRequestQueryDTO) } extension SearchTarget: TargetType { @@ -45,8 +45,8 @@ extension SearchTarget: TargetType { var parameters: RequestParams { switch self { - case .friendSearch(let dto): - return .requestQuery(dto) + case .friendSearch(let query): + return .requestQuery(query) } } }