Skip to content

Commit

Permalink
[CHORE/#37] 로직 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
boiledEgg-s committed Jul 11, 2024
1 parent a123cf2 commit ecf16b3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ fun LocalDate.getStringAsTitle(): String =
fun LocalDate.getDateStringInKorean(): String =
"${monthValue}${dayOfMonth}${dayOfWeek.getDisplayName(TextStyle.FULL, Locale.KOREAN)}"

fun LocalDate.getWeekIndexContainingSelectedDate(inDays: Int): Int = (inDays + dayOfMonth) / 7
fun LocalDate.getWeekIndexContainingSelectedDate(inDays: Int): Int = (inDays + dayOfMonth - 1) / 7

fun LocalDate.isToday(): Boolean = this == LocalDate.now()
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ fun CalendarScreen(
)
},
label = "List Transition"
) {
if (it) {
) { isListExpanded ->
if (isListExpanded) {
CalendarScrapListScreen(
modifier = Modifier
.padding(top = paddingValues.calculateTopPadding()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ class CalendarViewModel @Inject constructor(
)
}
} else {
disableWeekCalendar()
_selectedDate.update { currentState ->
currentState.copy(
isEnabled = !currentState.isEnabled
)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ fun CalendarWeek(
pageCount = {monthData.totalDays / 7}
)

Timber.tag("CalendarScreen")
.d("currentWeek:$currentWeek, totalDays: ${monthData.totalDays}, ${monthData.totalDays / 7}")

HorizontalPager(
modifier = modifier,
state = pagerState) { page ->
Expand Down

0 comments on commit ecf16b3

Please sign in to comment.