Skip to content

Conversation

@Kiyoung-Kim-57
Copy link
Member

🤔 배경

  • PhotoRoom에서 EditRoom으로 넘어갈 때 사진의 순서가 바뀜

📃 작업 내역

  • UseCase에서 이미지를 정렬해서 보냄

✅ 리뷰 노트

  1. 기존에는 UIImage(캡쳐된 이미지)만 가져왔지만 정렬을 위해 UserInfo의 ViewPosition을 같이 가져옵니다.
  2. ViewPosition의 rawValue는 참가한 순서대로 되어 있기 때문에 PositionOder로 배열에 담길 순서로 바꿔줍니다.
  • ViewPosition의 case 순서를 바꿔줄까 생각했지만 서버에서 해당 순서로 인코딩해서 보내주기 때문에 PositionOder로 변환해줬습니다.
  1. PositionOder의 sequence 값을 기준으로 배열을 정렬해줍니다.
  2. RemoteUserInfo가 nil일 경우 sequence 값을 2로 설정하고 정렬합니다.(2번 인덱스가 마지막 참가자의 자리이기 때문에)
  3. LocalUserInfo 가 nil일 경우 임시 이미지 4개가 담겨가던 부분을 수정했습니다.

🎨 스크린샷

iPhone SE(2세대) iPhone 14 iPhone 16 Pro Max
스샷 스샷 스샷

🚀 테스트 방법

- viewPosition에 따라 적당한 순서로 이미지 배열을 정렬해서 보냅니다.
- PositionOrder는 참가자순서로 나열된 ViewPosition을 배열에 담길 순서로 바꿔줍니다
- userInfo가 nil일 경우 PositionOder의 sequence를 2로 처리합니다.(배열의 2번 인덱스가 마지막 자리)
- localImage nil일 경우 빈 UIImage 전달하도록 변경
- UserInfo를 보내는 곳에 ViewPosition만 전달
@Kiyoung-Kim-57 Kiyoung-Kim-57 added the 🔧 fix 버그 수정 label Dec 3, 2024
@Kiyoung-Kim-57 Kiyoung-Kim-57 self-assigned this Dec 3, 2024
@Kiyoung-Kim-57 Kiyoung-Kim-57 linked an issue Dec 3, 2024 that may be closed by this pull request
1 task
@Kiyoung-Kim-57 Kiyoung-Kim-57 changed the base branch from develop to fix/#175-hotfix-for-demo December 3, 2024 09:13
Copy link
Collaborator

@0Hooni 0Hooni left a comment

Choose a reason for hiding this comment

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

수고 많으셨습니다!

LGTM 💯

Comment on lines -9 to -12
PTGImage.temp1.image,
PTGImage.temp2.image,
PTGImage.temp3.image,
PTGImage.temp4.image]
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
Member Author

Choose a reason for hiding this comment

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

6b6d7f4 오 감사합니다!!! 수정했습니다!

Copy link
Member

@youn9k youn9k left a comment

Choose a reason for hiding this comment

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

LGTM!

@Kiyoung-Kim-57 Kiyoung-Kim-57 merged commit e0926f1 into fix/#175-hotfix-for-demo Dec 3, 2024
@0Hooni 0Hooni deleted the fix/#177-sort-photos branch December 4, 2024 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 fix 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

사진 위치 맞춰주기

4 participants