Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 각종 문제점 개선 #293

Merged
merged 8 commits into from
Dec 11, 2023
Merged

chore: 각종 문제점 개선 #293

merged 8 commits into from
Dec 11, 2023

Conversation

chopmozzi
Copy link
Collaborator

🧑‍🚀 PR 요약

  • 썸네일 로드 부분 빼버리기
  • asyncCompactMap빼버리기 -> 확실히 속도 개선이 있는 듯? 플라시보일지도..
  • 프로필 찌부 문제 수정하기 -> aspectFill
  • 프로필 재생 버그 픽스 -> 프로필에서 fetchProfile시 posts 초기화
  • 신고 실패 문제 확인하고 픽스 -> DTO 이름 문제

📌 변경 사항

ReportDTO 변경했습니다.
cell은 영상 먼저 로드하고 프로필 이미지와 로케이션을 로드합니다. 딜레이 부분을 좀 해결한 것 같습니다.

Linked Issue

close #289

@@ -36,7 +36,7 @@ final class MockReportWorker: ReportWorkerProtocol {
do {
let bodyParameters = ReportDTO(
memberId: nil,
boardID: 1,
boardId: 1,
Copy link
Collaborator

@loinsir loinsir Dec 11, 2023

Choose a reason for hiding this comment

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

엇 이건 원래대로 ID가 더 적절한 것 같습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

서버에서 response주는게 저거라 ID로 해서 오류가 난 거였습니다.

Copy link
Collaborator

@loinsir loinsir Dec 11, 2023

Choose a reason for hiding this comment

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

CodingKeys...ㅋㅋㅋㅋㅋ

private func transPostToVideo(_ posts: [Post]) async -> [Models.PlaybackVideo] {
return await posts.asyncCompactMap { post in
private func transPostToVideo(_ posts: [Post]) -> [Models.PlaybackVideo] {
return posts.compactMap { post in
Copy link
Collaborator

Choose a reason for hiding this comment

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

이제 여기서 이미지 로드를 기다리지 않아도 되어서 확실히 성능 향상이 있을 것 같네요
고생하셨습니다...

Comment on lines +255 to +259
self.interactor?.loadProfileImageAndLocation(with: Models.LoadProfileImageAndLocation.Request(
curCell: cell,
profileImageURL: playbackVideo.displayedPost.member.profileImageURL,
latitude: playbackVideo.displayedPost.board.latitude,
longitude: playbackVideo.displayedPost.board.longitude))
Copy link
Collaborator

Choose a reason for hiding this comment

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

오 확실히 이렇게 필요한 부분에서만 호출되어서 로드되면 모든 데이터를 기다리지 않게 되겠네요

@@ -60,7 +60,7 @@ final class ProfileInteractor: ProfileBusinessLogic, ProfileDataStore {
guard let userProfile = await userWorker?.fetchProfile(by: profileId) else {
return false
}

posts = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

놓친 부분 찾아주셔서 감사합니다.
태그 재생목록에도 같은 실수를 했는데, 이건 제가 지금 테스트 코드 짜면서 수정할게요!

Copy link
Collaborator

@loinsir loinsir left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~~
네이밍? 만 한번 재고해주세요~~~~

@chopmozzi
Copy link
Collaborator Author

@loinsir 네이밍 재고가 boardID말씀하신건가용??

@@ -10,6 +10,6 @@ import Foundation

struct ReportDTO: Codable {
let memberId: Int?
let boardID: Int
let boardId: Int
Copy link
Member

Choose a reason for hiding this comment

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

CodingKeys를 쓰면 이 id와 ID의 혼란이 조금은 나아질지도..

Copy link
Collaborator Author

@chopmozzi chopmozzi Dec 11, 2023

Choose a reason for hiding this comment

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

좋은 생각입니다. 반영할게요.

Comment on lines +331 to +332
async let profileImageData = self.worker?.fetchImageData(with: request.profileImageURL)
async let location: String? = self.worker?.transLocation(latitude: request.latitude, longitude: request.longitude)
Copy link
Member

Choose a reason for hiding this comment

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

👍👍

@@ -51,6 +51,7 @@ final class PlaybackView: UIView {
button.layer.borderColor = UIColor.layoverWhite.cgColor
button.backgroundColor = .layoverWhite
button.clipsToBounds = true
button.imageView?.contentMode = .scaleAspectFill
return button
}()

Copy link
Member

@anyukyung anyukyung Dec 11, 2023

Choose a reason for hiding this comment

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

그.. 이 이슈랑 관련된건 아니긴한데 playbackView 내부 Profile 버튼의 borderColor를
grey400으로 바까주실 수 있나여 ㅎ

Copy link
Member

Choose a reason for hiding this comment

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

흰색이 좀 튀는 너낌

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

UIButton이 아니라 Button의 이미지의 border컬러가 맞을까요?

Comment on lines +16 to +20
enum CodingKeys: String, CodingKey {
case memberID = "memberId"
case boardID = "boardId"
case reportType
}
Copy link
Member

Choose a reason for hiding this comment

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

👍👍👍👍

Copy link
Member

@anyukyung anyukyung left a comment

Choose a reason for hiding this comment

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

고생하셨습니💵

@loinsir
Copy link
Collaborator

loinsir commented Dec 11, 2023

@loinsir 네이밍 재고가 boardID말씀하신건가용??

네 맞습니다

@chopmozzi chopmozzi merged commit 8a1dfc7 into iOS/dev Dec 11, 2023
1 check passed
@chopmozzi chopmozzi deleted the iOS/chore#289 branch December 11, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants