Skip to content

Commit

Permalink
[IDLE-000] 센터 프로필 수정시 이미지 업로드 타임아웃시간 증가
Browse files Browse the repository at this point in the history
프로필 업로드시 타임아웃이 발생하는 버그가 있습니다. 개선할 예정입니다.
  • Loading branch information
J0onYEong committed Sep 13, 2024
1 parent 4ac4991 commit 757fcb9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ public class BaseNetworkService<TagetAPI: BaseAPI> {
let configuration = URLSessionConfiguration.default

// 단일 요청이 완료되는데 걸리는 최대 시간, 초과시 타임아웃
configuration.timeoutIntervalForRequest = 10
configuration.timeoutIntervalForRequest = 20

// 하나의 리소스를 로드하는데 걸리는 시간, 재시도를 포함한다 초과시 타임아웃
configuration.timeoutIntervalForResource = 10
configuration.timeoutIntervalForResource = 20

// Cache policy: 로컬캐시를 무시하고 항상 새로운 데이터를 가져온다.
configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public class CenterProfileViewModel: BaseViewModel, CenterProfileViewModelable {


// 최신 값들 + 버튼이 눌릴 경우 변경 로직이 실행된다.
let editingRequestResult = editingFinishButtonPressed
let editingRequestResult = mapEndLoading(mapStartLoading(editingFinishButtonPressed.asObservable())
.map({ [unowned self] _ in
checkModification()
})
Expand All @@ -214,7 +214,7 @@ public class CenterProfileViewModel: BaseViewModel, CenterProfileViewModelable {
introduction: introduction,
imageInfo: imageInfo
)
}
})
.share()

let editingValidation = editingRequestResult
Expand All @@ -235,8 +235,8 @@ public class CenterProfileViewModel: BaseViewModel, CenterProfileViewModelable {
.map({ error in
// 변경 실패 Alert
return DefaultAlertContentVO(
title: "변경 실패",
message: "변경 싪패 이유"
title: "프로필 수정 실패",
message: error.message
)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ public class WorkerProfileViewModel: OtherWorkerProfileViewModelable {
.disposed(by: disposbag)

phoneCallButtonClicked
.subscribe(onNext: { _ in
.withLatestFrom(fetchedProfileVOSuccess)
.subscribe(onNext: { profileVO in

// 안심번호 전화연결
let phoneNumber = profileVO.phoneNumber

if let phoneURL = URL(string: "tel://\(phoneNumber)"), UIApplication.shared.canOpenURL(phoneURL) {
UIApplication.shared.open(phoneURL, options: [:], completionHandler: nil)
}
})
.disposed(by: disposbag)

Expand Down

0 comments on commit 757fcb9

Please sign in to comment.