Skip to content

Conversation

@SeonJeongk
Copy link
Contributor

📝 작업 내용

  • Closes [TNT-190] 트레이너 연결 요청 팝업 #53

  • 홈 화면 진입 시 연결 요청 팝업이 자동으로 표시되도록 구현했습니다.

    • 회원 조회 API를 호출하여 isConnected 값을 확인하고,
      연결되지 않은 상태이고 3일 동안 보지 않기로 설정한 시간이 지났다면
      다이얼로그를 표시하도록 처리했습니다.
  • 3일 동안 보지 않기 기능을 구현했습니다.

    • 사용자가 3일 동안 보지 않기 를 선택하면 다이얼로그가 닫히는 순간의 LocalDateTime을
      ConnectLocalDataSource에 저장하도록 구현했습니다.
    • 저장된 값과 현재 시간을 비교하여 3일(72시간)이 지나면 다시 다이얼로그를 띄우도록 처리했습니다.
    • 저장된 시간은 로그아웃 혹은 탈퇴 시 자동으로 초기화하도록 처리했습니다.
  • 회원가입 및 프로필 사진과 관련된 수정 사항 포함되어 있습니다

📸 실행 화면

트레이너 연결 이후 팝업 노출

default.mp4

3일동안 보지 않기 동작

3.mp4

🙆🏻 리뷰 요청 사항

없습니다.. 영상에 보이는 연결 완료 화면 이미지 오류는 해결했습니다!

👀 레퍼런스

@SeonJeongk SeonJeongk added ✨ Feat 기능 구현 🛠️ Fix 버그 발생 보고 및 해결 🌻 선정 김씨 집안 막내 김선정 labels Feb 14, 2025
@SeonJeongk SeonJeongk self-assigned this Feb 14, 2025
@github-actions github-actions bot requested a review from hoyahozz February 14, 2025 12:37
@SeonJeongk SeonJeongk added this to the 3차 스프린트 milestone Feb 14, 2025
Copy link
Member

@hoyahozz hoyahozz left a comment

Choose a reason for hiding this comment

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

image

class ConnectLocalDataSource @Inject constructor(
@Named(CONNECT_STORAGE_NAME) private val connectPreferences: DataStore<Preferences>,
) {
val homeDialogHiddenDate: Flow<String?> = connectPreferences.data.map { preferences ->
Copy link
Member

Choose a reason for hiding this comment

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

변수명이 UI와 의존성을 지니지 않도록

ExplicitDeniedConnectDate 와 같은 방식으로 네이밍하는게 좋을 것 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

8241263

앗 넵 수정했습니다!


val lastHiddenDate = connectRepository.getHomeDialogHiddenDate().firstOrNull()
val isHidden = lastHiddenDate != null &&
Duration.between(lastHiddenDate, currentDateTime).toHours() < 72
Copy link
Member

Choose a reason for hiding this comment

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

72 상수 선언해두면 좋을 것 같아요 !_!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

c7e63ad

수정했습니다!

@Composable
private fun ProfileSection(
profile: User,
context: Context,
Copy link
Member

Choose a reason for hiding this comment

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

추후에 painter 받아서 사용하는 쪽에서 placeholder 설정하는 방식으로 만들면 좋을 것 같아요

그럼 context 도 안받아도 될듯요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

음! 나중에 수정해두겠습니다

# Conflicts:
#	feature/trainee/signup/src/main/java/co/kr/tnt/trainee/signup/TraineeSignUpViewModel.kt
#	feature/trainer/signup/src/main/java/co/kr/tnt/trainer/signup/TrainerSignUpViewModel.kt
@SeonJeongk SeonJeongk merged commit bd072b0 into develop Feb 14, 2025
7 checks passed
@SeonJeongk SeonJeongk deleted the feature/TNT-190 branch February 14, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feat 기능 구현 🌻 선정 김씨 집안 막내 김선정 🛠️ Fix 버그 발생 보고 및 해결

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TNT-190] 트레이너 연결 요청 팝업

3 participants