Skip to content

[Feat] #74 - 수정하기 기능 구현 및 분기처리#76

Merged
L-j-h-c merged 6 commits intoTeamRecorDream:developfrom
L-j-h-c:feature/#74-DreamWriteModify
Dec 27, 2022
Merged

[Feat] #74 - 수정하기 기능 구현 및 분기처리#76
L-j-h-c merged 6 commits intoTeamRecorDream:developfrom
L-j-h-c:feature/#74-DreamWriteModify

Conversation

@L-j-h-c
Copy link
Copy Markdown
Contributor

@L-j-h-c L-j-h-c commented Dec 27, 2022

👻 작업한 내용

수정하기 기능 구현 및 분기처리

🎤 PR Point

꿈 기록 조회(상세보기) API를 구현했습니다
꿈 기록 수정 API를 구현했습니다

cc. @Suyeon9911
상세보기 API를 구현했는데 이를 어떻게 재사용할지 논의하면 좋을 것 같아요!
그리고 저번에 이야기했던 녹음 download도 수정하기 뷰에서 녹음 시간을 받아올 필요가 있어 구현했어요~ 참고하시면 좋겠슴당!

📮 관련 이슈

@L-j-h-c L-j-h-c added the 록시보이 🌽 담당자 label Dec 27, 2022
@L-j-h-c L-j-h-c self-assigned this Dec 27, 2022
Copy link
Copy Markdown
Member

@EunHee-Jeong EunHee-Jeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 다시 멘션 주시면 어푸룹 할게요 ㅋㄷㅋㄷ

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!)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

신기방기... 👍

Comment on lines +93 to +95
DispatchQueue.main.async {
output.loadingStatus.accept(true)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스레드를 명시해주지 않으면 output내의 값에 비동기적으로 전달이 되지 않는 건가용??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 이건 사실 로딩이 Modal 액션이 올라온 이후에 신호를 받아야 해서 시리얼 큐 사용을 위한...트릭으로 썼는데 좋은 방식은 아닌 것 같슴다 ㅜㅜ

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하... 구독할 때 subscribe 대신 subscribeOn으로 스레드 우선순위를 지정해줄 수 있더라고요...! 도움이 될진 모르겠지만... 생각이 나서... 🥔

…m-iOS into feature/TeamRecorDream#74-DreamWriteModify

# Conflicts:
#	RecorDream-iOS/Projects/Modules/RD-Network/Sources/Services/RecordService.swift
Copy link
Copy Markdown
Member

@EunHee-Jeong EunHee-Jeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@L-j-h-c L-j-h-c merged commit a282fbd into TeamRecorDream:develop Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 수정하기 뷰 분기처리

2 participants