Skip to content

[Fix#60] 비공개 테스트 4차 업데이트 #61

Merged
1971123-seongmin merged 15 commits intodevelopfrom
#fix-close-test-update-4
Apr 24, 2025
Merged

[Fix#60] 비공개 테스트 4차 업데이트 #61
1971123-seongmin merged 15 commits intodevelopfrom
#fix-close-test-update-4

Conversation

@1971123-seongmin
Copy link
Copy Markdown
Member

@1971123-seongmin 1971123-seongmin commented Apr 21, 2025

🧨 Issue

💻 Work Description

  • 프로필 화면, 프로필 수정 화면에서 프로필 사진이 안나오는 문제 수정

  • 프로필 수정에서 생년월일 여부에 관계없이 수정할 수 있도록 조건 변경

  • 홈 화면 filter에서 25분 이상, 5만원 이상 조건 선택시 서버 통신 실패하는 문제 수정

    • 해당 조건에 대해 -1 -> null로 값 전송
  • SpotList fetchSpots 함수 성공시 상태 업데이트 로직 변경

    • 현재 Success State를 새로 생성해서 기존 데이터가 날아가는 문제가 있습니다.

      • 이를 해결 하기위해 임시로 copy를 사용했습니다.
    • 또한, fetchSpots에서 함수를 호출하는 spotListResultDeferred의 condition도 Condition.Default에서 아래로 수정했습니다.

      • 이렇게 안하면 항상 fetchSpots의 값이 Condition.Default로만 실행되기 때문에 이렇게 바꿨습니다.
  (state as?SpotListUiState.Success)?.currentCondition?.toCondition()?: Condition.Default
  • SpotList 일치하는 맛집 없을 때 조건 변경

    • 서버에서 보낸 spotList의 isEmpty 여부로 판별하도록 수정
  • 프로필 수정 버튼 활성화 조건 수정

    • 닉네임이 유효하고,
    • 닉네임 / 생일 / 프로필 사진 중 하나라도 변경되었으면 활성화
      • 단, 생년월일이 변경된 경우 생년월일이 유효해야 함
  • 프로필 수정 닉네임 텍스트 필드 수정

    • 특수 문자 입력 시 입력은 안되고, 에러 문구를 표시하도록 수정
    • 최대 글자 수(16)가 되었을 때 입력하면 입력자체는 허용(검증 api도 호출)하되, 실제 글자는 입력 안됨

💭 To Reviewers

  • 프로필 수정 화면에 진입 할 때 서버에서 값을 로딩하는 시간 차로 인해 순간 깜빡이며 뷰가 이상하게 바뀌는 문제가 있습니다.

    • 이 문제의 경우 코드 구조 자체를 나중에 바꿔서 해결해야 한다고 생각해서 일단 두고 나중에 수정하면 될 것 같습니다.
  • 프로필 수정에서 이미지 눌러서 갤러리 들어가서 이미지를 선택하지 않고 뒤로가기로 나오면 이미지가 저장이 안되서 기존 이미지 날아가서 프로필 이미지에 아무것도 안뜨는 (null) 문제가 있습니다.

    • 화면 구조 자체를 바꿔야할 것 같습니다.

    • 현재 구조는 갤러리 화면에서 네비게이션을 통해 프로필 수정 화면에 이미지 Uri를 담아 보내는 방식입니다.

      • profileNavigation.kt 화면을 보면 알 수 있습니다.

@1971123-seongmin 1971123-seongmin added the FIX🔨 버그 및 오류 해결 label Apr 21, 2025
@1971123-seongmin 1971123-seongmin self-assigned this Apr 21, 2025
Copy link
Copy Markdown
Collaborator

@ThirFir ThirFir left a comment

Choose a reason for hiding this comment

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

수고하셨어요 👏👏

photoUri.startsWith("https://") -> {
AsyncImage(
model = photoUri,
contentDescription = "선택한 프로필 사진",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

null인게 나을거같네요.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

contentDescription 말 하시는 건가요??

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

네네

Comment on lines +109 to 111
selectedPhotoId.let {
viewModel.updateProfileImage(selectedPhotoId)
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

여긴 왜 let으로 감싸져 있나요 ?

Copy link
Copy Markdown
Member Author

@1971123-seongmin 1971123-seongmin Apr 22, 2025

Choose a reason for hiding this comment

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

ProfileModScreen은 제가 만든 화면은 아니라 질문하신 부분은 원래 만들어져 있던 그대로 놔뒀어요 (따로 손 안대고 그대로 뒀어요!) 바뀐거로 나온건 코드 정리 최적화 기능 때문에 된 것 같아요

Comment on lines +140 to 148
if (text.any { it in "!@#$%^&*()-=+[]{};:'\",<>/?\\|" }) {
errors.add(NicknameErrorType.InvalidChar)
}

val allowedChars = (33..126).map { it.toChar() } +
('가'..'힣') + ('ㄱ'..'ㅎ') + ('ㅏ'..'ㅣ')
if (filteredText.any { it !in allowedChars }) {
if (text.any { it !in allowedChars }) {
errors.add(NicknameErrorType.InvalidLang)
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

정규식을 사용하지 않은 이유가 있나요 ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

이것도 원래 되어있던 코드를 그대로 활용한건데 다른 것들 고치느라 바빠서 정규식을 생각해볼 겨를이 없었네요.
Regex 이용해서 정규식으로 바꾸면 될 것 같네요.
감사합니다 ~~

@1971123-seongmin 1971123-seongmin merged commit ff40a39 into develop Apr 24, 2025
1 check passed
@1971123-seongmin 1971123-seongmin deleted the #fix-close-test-update-4 branch April 25, 2025 01:56
ThirFir pushed a commit that referenced this pull request May 1, 2025
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.

[Fix] 비공개 테스트 4차 업데이트

2 participants