인증 시간 정책 수정#145
Open
chanho0908 wants to merge 7 commits intodevelopfrom
Open
Conversation
## 변경 사항 - RelativeTimeFormatter를 CertificationTime 도메인 모델로 리팩토링 - 시간 표시 규칙 개선 (0~10분: 방금 전, 11~59분: 분 단위, 1~23시간: 시간 단위, 24시간+: 일 단위) - 다국어 지원을 위한 strings.xml 분리 ## 아키텍처 개선 **Domain Layer (domain 모듈)** - CertificationTime sealed class 추가 - 팩토리 메서드 패턴: `CertificationTime.from(certifiedAt)` - 비즈니스 로직(시간 계산)만 담당 **UI Layer (feature 모듈)** - formatCertificationTime() Composable 함수로 포맷팅 처리 - stringResource 사용으로 다국어 지원 **제거** - core/util의 RelativeTimeFormatter 삭제 (Context 의존성 제거) - UiState의 포맷팅 로직 제거 (순수 데이터 클래스로 변경)
- `CooldownTime` sealed interface에 `Hours` 타입을 추가하고 `MinutesOnly`를 `Minutes`로 변경 - 남은 시간이 시간 단위로 나누어 떨어질 경우 `Hours`를 반환하도록 변환 로직 수정 - 공통 시간 포맷 문자열 리소스(`hours_only`, `hours_minutes`, `minutes_only`) 추가 및 기존 쿨타임 전용 리소스 제거 - `HomeScreen` 및 `PhotologDetailScreen`의 시간 포맷팅 로직을 `Context` 기반으로 변경하고 신규 타입 대응 - `CooldownTimeTest`에 시간 단위 케이스에 대한 테스트 코드 추가 및 기존 테스트 수정
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
이슈 번호
#143
작업내용
7일 이후 월.날짜 -> 24시간 후 일단위로
전체 정책
00초~ 10분 : 방금 전
11분~59분: 분단위로
60분~23시간 59분 : 시간단위로
24시간 후: 일단위로
기존 object Formatter로 구현되어 있던 포맷팅 로직을 Domain 정책으로 수정
찌르기 쿨타임 시간 포맷팅 로직도 도메인 정책으로 수정
테스트 코드 추가 !
결과물
리뷰어에게 추가로 요구하는 사항 (선택)