Skip to content

Commit

Permalink
Merge branch 'iOS/task/Map-Polyline-Filtering' of github.com:boostcam…
Browse files Browse the repository at this point in the history
…pwm2023/iOS01-MusicSpot into iOS/task/Map-Polyline-Filtering
  • Loading branch information
yoondj98 committed Jan 8, 2024
2 parents fabaf9a + 331f063 commit 5fec53f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions iOS/MSData/Sources/MSData/Repository/UserRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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
Expand Down

0 comments on commit 5fec53f

Please sign in to comment.