From 331f0631097097027babc5314deecc14a38153c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Junnos=20=EF=A3=BF?= Date: Wed, 13 Dec 2023 19:12:34 +0900 Subject: [PATCH] =?UTF-8?q?:bug:=20Home=20=EC=9E=90=EB=8F=99=20Refresh?= =?UTF-8?q?=EA=B0=80=20=EC=97=AC=EC=A0=95=20=EA=B8=B0=EB=A1=9D=EC=A4=91?= =?UTF-8?q?=EC=9D=BC=EB=95=8C=EB=A7=8C=20=EB=8F=99=EC=9E=91=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Presentation/HomeViewController.swift | 4 +++- .../Sources/MSData/Repository/UserRepository.swift | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/iOS/Features/Home/Sources/Home/Presentation/HomeViewController.swift b/iOS/Features/Home/Sources/Home/Presentation/HomeViewController.swift index b727b90..b355783 100644 --- a/iOS/Features/Home/Sources/Home/Presentation/HomeViewController.swift +++ b/iOS/Features/Home/Sources/Home/Presentation/HomeViewController.swift @@ -124,7 +124,9 @@ public final class HomeViewController: HomeBottomSheetViewController { super.viewDidAppear(animated) // 화면 시작 시 새로고침 버튼 기능 한번 실행 - self.refreshButton.sendActions(for: .touchUpInside) + if !self.viewModel.state.isRecording.value { + self.refreshButton.sendActions(for: .touchUpInside) + } } // MARK: - Combine Binding diff --git a/iOS/MSData/Sources/MSData/Repository/UserRepository.swift b/iOS/MSData/Sources/MSData/Repository/UserRepository.swift index 24954a7..308efb1 100644 --- a/iOS/MSData/Sources/MSData/Repository/UserRepository.swift +++ b/iOS/MSData/Sources/MSData/Repository/UserRepository.swift @@ -57,11 +57,15 @@ public struct UserRepositoryImplementation: UserRepository { let result = await self.networking.request(UserResponseDTO.self, router: router) switch result { case .success(let userResponse): + #if DEBUG + MSLogger.make(category: .network).debug("서버에 새로운 유저를 생성했습니다.") + #endif if let storedUserID = try? self.storeUUID(userID) { return .success(storedUserID) + } else { + MSLogger.make(category: .keychain).warning("Keychain에 새로운 유저 정보를 저장하지 못했습니다.") + return .success(userResponse.userID) } - MSLogger.make(category: .keychain).warning("서버에 새로운 유저를 생성했지만, Keychain에 저장하지 못했습니다.") - return .success(userResponse.userID) case .failure(let error): return .failure(error) } @@ -73,6 +77,9 @@ public struct UserRepositoryImplementation: UserRepository { do { try self.keychain.set(value: userID, account: account) + #if DEBUG + MSLogger.make(category: .keychain).debug("Keychain에 서버 정보를 저장했습니다.") + #endif return userID } catch { throw MSKeychainStorage.KeychainError.creationError