Open
Conversation
- 이전/다음 달로 이동이 가능한지 확인하기 위해 `hasNext`와 `hasPrevious` 속성을 추가 - 기존 `isInProgressStatsDetail` 로직을 `selectedDate` null 체크에서 초기 로딩 상태를 나타내는 boolean 값으로 변경
- `fetchStatsDetail` 호출 시 이전 Job을 취소하여 중복 호출 방지 - 목표 완료/삭제 시 `StatsRefreshBus`에 `Publisher` 정보를 전달하여 분기 처리 추가
Member
Author
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Member
Author
|
@coderabbitai review |
dogmania
requested changes
Feb 25, 2026
| } | ||
|
|
||
| StatsDetailScreen( | ||
| uiSate = uiState, |
| private val statsRefreshBus: StatsRefreshBus, | ||
| private val goalRepository: GoalRepository, | ||
| private val statsRepository: StatsRepository, | ||
| savedSateHandle: SavedStateHandle, |
Member
| Modifier | ||
| .fillMaxSize() | ||
| .background(GrayColor.C050) | ||
| .verticalScroll(scrollState), |
Member
There was a problem hiding this comment.
여기에 스크롤을 주면 상단바도 같이 스크롤돼서 상단바는 스크롤 영역에서 빼주세요!
Comment on lines
48
to
62
| init { | ||
| viewModelScope.launch { | ||
| monthChangeFlow | ||
| .distinctUntilChanged() | ||
| .debounce(DEBOUNCE_INTERVAL) | ||
| .collect { date -> | ||
| fetchStatsDetail(date) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| init { | ||
| reduceNavArguments() | ||
| fetchStatsDetail(argDate?.let { LocalDate.parse(it) }) | ||
| } |
|
|
||
| private val argDate: String? = savedSateHandle.get<String>(NavRoutes.StatsDetailRoute.ARG_DATE) | ||
|
|
||
| private val cache = mutableMapOf<LocalDate, StatsDetail>() |
Member
There was a problem hiding this comment.
이게 나중에 Repository 로직이 어떻게 수정될지에 따라 다르겠지만 캐시의 기준이 월 단위 캐시면 LocalDate보다는 YearMonth를 key로 쓰는 건 어떨까요
Member
Author
There was a problem hiding this comment.
API 호출할 때 YearMonth로 호출해야해서 변경했어 !
리뷰 반영 커밋 : db67239
|
|
||
| companion object { | ||
| private const val GOAL_ID_NOT_FOUND = "Goal Id Argument Not Found" | ||
| private const val DEBOUNCE_INTERVAL = 600L |
Member
There was a problem hiding this comment.
600은 살짝 느린감이 있어서 보통 디바운싱할 떄 300 정도를 많이 사용하던데 수정하는 건 어떠신가요
# Conflicts: # feature/stats/detail/src/main/java/com/twix/stats/detail/StatsDetailRoute.kt # feature/stats/detail/src/main/java/com/twix/stats/detail/StatsDetailScreen.kt # feature/stats/detail/src/main/java/com/twix/stats/detail/StatsDetailViewModel.kt # feature/stats/detail/src/main/java/com/twix/stats/detail/component/SummaryContent.kt # feature/stats/detail/src/main/java/com/twix/stats/detail/contract/StatsDetailIntent.kt # feature/stats/detail/src/main/java/com/twix/stats/detail/di/StatsDetailModule.kt
- `savedSateHandle`을 `savedStateHandle`로 수정
- `verticalScroll` 수식 범위를 `Box`로 이동하여 Topbar는 스크롤되지 않도록 수정
- `monthChangeFlow`를 구독하고 처리하는 로직을 별도의 `collectMonthChangeFlow` 메서드로 분리하여 `init` 블록의 가독성을 개선했습니다. - `init` 블록 내 메서드 호출 순서를 조정했습니다.
- `DEBOUNCE_INTERVAL` 값을 600L에서 300L로 수정
- 월별 통계 데이터를 캐시할 때, `LocalDate` 대신 `YearMonth`를 키로 사용하여 월 단위 캐싱의 정확성을 개선
- `SummaryRow` 컴포저블을 새로 추가하여 반복되는 UI 로직을 개선 - 기존의 복잡한 `Row`/`Column` 구조를 `SummaryRow`를 사용하도록 수정하여 코드 가독성 및 재사용성 향상
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.

이슈 번호
#88
작업내용
결과물
default.mp4
리뷰어에게 추가로 요구하는 사항 (선택)
TODO
-[ ] 목표 수정 & 끝내기 기능 연동