[Feat] #74 - 수정하기 기능 구현 및 분기처리#76
Merged
L-j-h-c merged 6 commits intoTeamRecorDream:developfrom Dec 27, 2022
Merged
Conversation
Member
EunHee-Jeong
left a comment
There was a problem hiding this comment.
수고하셨습니다! 다시 멘션 주시면 어푸룹 할게요 ㅋㄷㅋㄷ
Comment on lines
+191
to
+206
|
|
||
| func downloadInRx(url: String) -> Observable<String> { | ||
| let destination: DownloadRequest.Destination = { _, _ in | ||
| let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] | ||
| let fileURL = documentsURL.appendingPathComponent("downloadedVoice.m4a") | ||
|
|
||
| return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) | ||
| } | ||
|
|
||
| return Observable<String>.create { observer in | ||
| self.AFManager.download(url, to: destination).response { response in | ||
| if response.error == nil, let path = response.fileURL?.path { | ||
| observer.onNext(path) | ||
| } else { | ||
| observer.onError(response.error!) | ||
| } |
Comment on lines
+93
to
+95
| DispatchQueue.main.async { | ||
| output.loadingStatus.accept(true) | ||
| } |
Member
There was a problem hiding this comment.
스레드를 명시해주지 않으면 output내의 값에 비동기적으로 전달이 되지 않는 건가용??
Contributor
Author
There was a problem hiding this comment.
아 이건 사실 로딩이 Modal 액션이 올라온 이후에 신호를 받아야 해서 시리얼 큐 사용을 위한...트릭으로 썼는데 좋은 방식은 아닌 것 같슴다 ㅜㅜ
Member
There was a problem hiding this comment.
아하... 구독할 때 subscribe 대신 subscribeOn으로 스레드 우선순위를 지정해줄 수 있더라고요...! 도움이 될진 모르겠지만... 생각이 나서... 🥔
…m-iOS into feature/TeamRecorDream#74-DreamWriteModify # Conflicts: # RecorDream-iOS/Projects/Modules/RD-Network/Sources/Services/RecordService.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👻 작업한 내용
수정하기 기능 구현 및 분기처리
🎤 PR Point
꿈 기록 조회(상세보기) API를 구현했습니다
꿈 기록 수정 API를 구현했습니다
cc. @Suyeon9911
상세보기 API를 구현했는데 이를 어떻게 재사용할지 논의하면 좋을 것 같아요!
그리고 저번에 이야기했던 녹음 download도 수정하기 뷰에서 녹음 시간을 받아올 필요가 있어 구현했어요~ 참고하시면 좋겠슴당!
📮 관련 이슈