Skip to content

Commit

Permalink
[REFACTOR/#37] 리뷰 기반 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
boiledEgg-s committed Jul 11, 2024
1 parent 8b77265 commit 7203b87
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.HorizontalDivider
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -64,11 +65,9 @@ fun CalendarMonth(
}
}
if(month.indexOf(week) != month.lastIndex) {
Spacer(
modifier = Modifier
.fillMaxWidth()
.height(1.dp)
.background(color = Grey150)
HorizontalDivider(
thickness = 1.dp,
color = Grey150
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
Expand Down Expand Up @@ -116,7 +117,7 @@ fun CalendarScreen(
sizeTransform = SizeTransform(clip = true)
)
},
label = "List Transition"
label = stringResource(id = R.string.calendar_animation_label)
) { isListExpanded ->
if (isListExpanded) {
CalendarScrapListScreen(
Expand All @@ -133,11 +134,10 @@ fun CalendarScreen(
.padding(top = paddingValues.calculateTopPadding())
) {
WeekDaysHeader()
Spacer(
modifier = Modifier
.fillMaxWidth()
.height(1.dp)
.background(color = Grey200)

HorizontalDivider(
thickness = 1.dp,
color = Grey200
)

AnimatedContent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.theme.Back
import com.terning.core.designsystem.theme.Grey200
import com.terning.core.designsystem.theme.Grey400
import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.designsystem.theme.White
import com.terning.feature.R
import com.terning.feature.calendar.models.Scrap
import com.terning.feature.calendar.models.SelectedDateState
import com.terning.feature.calendar.scrap.CalendarScrapList
Expand Down Expand Up @@ -64,7 +66,7 @@ fun CalendarWeekWithScrap(
modifier = Modifier
.padding(top = 42.dp)
.fillMaxWidth(),
text = "선택하신 날짜에 지원 마감인 스크랩 공고가 없어요.",
text = stringResource(id = R.string.calendar_empty_scrap),
textAlign = TextAlign.Center,
style = TerningTheme.typography.body5,
color = Grey400
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,15 @@ fun CalendarScrapList(
modifier = Modifier.padding(start = 24.dp, top = 16.dp, bottom = 15.dp)
)
}
val topModifier = if(!isFromList) {
Modifier.fillMaxWidth().padding(horizontal = 24.dp).verticalScroll(scrollState)
val topModifier = if (!isFromList) {
Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp)
.verticalScroll(scrollState)
} else {
Modifier.fillMaxWidth().padding(horizontal = 24.dp)
Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp)
}

if (scrapLists[selectedDate.dayOfMonth - 1].isEmpty()) {
Expand Down
1 change: 1 addition & 0 deletions feature/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<string name="calendar_button_description_next">next</string>
<string name="calendar_button_description_list">list</string>
<string name="calendar_animation_label">Calendar Transition</string>
<string name="calendar_empty_scrap">선택하신 날짜에 지원 마감인 스크랩 공고가 없어요</string>

<!-- 홈 오늘 마감 공고 -->
<string name="home_today_title">오늘 마감되는 %s님의 관심 공고</string>
Expand Down

0 comments on commit 7203b87

Please sign in to comment.