Skip to content

Commit fd581da

Browse files
authored
Merge: SIMT-104 메인 페이지, 일정 작성 달력 크기 수정
2 parents 5ddc796 + e7f7da5 commit fd581da

File tree

3 files changed

+8
-33
lines changed

3 files changed

+8
-33
lines changed

feature/feature-home/src/main/java/com/comit/feature_home/calendar/SimTongCalendar.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ enum class SimTongCalendarStatus(
8080
),
8181
}
8282

83+
private val CalendarLoadingHeight: Dp = 255.dp
8384
private const val Week: Int = 7
8485

8586
@Stable
@@ -216,14 +217,16 @@ fun SimTongCalendar(
216217
CircularProgressIndicator(
217218
color = SimTongColor.MainColor,
218219
modifier = Modifier
219-
.fillMaxSize()
220+
.fillMaxWidth()
221+
.height(CalendarLoadingHeight)
220222
.wrapContentSize(Alignment.Center),
221223
)
222224
} else {
223225
SimTongCalendarList(
224226
list = calendarList,
225227
onItemClicked = onItemClicked
226228
)
229+
Spacer(modifier = Modifier.height(40.dp))
227230
}
228231
}
229232
}
@@ -327,9 +330,7 @@ fun SimTongCalendarList(
327330
list: List<SimTongCalendarData>,
328331
onItemClicked: (Int, String) -> Unit = { _, _ -> },
329332
) {
330-
Column(
331-
modifier = Modifier.fillMaxSize()
332-
) {
333+
Column {
333334
repeat(list.size / Week) { size ->
334335
val rowList = list.subList(size * Week, size * Week + Week)
335336

feature/feature-home/src/main/java/com/comit/feature_home/screen/HomeScreen.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ private val HomeScreenPadding = PaddingValues(
5959
horizontal = 25.dp,
6060
)
6161

62-
private val HomeCalendarHeight: Dp = 343.dp
63-
6462
private const val StartDateAdd = -3
6563
private const val EndDateAdd = 3
6664

@@ -177,7 +175,6 @@ fun HomeScreen(
177175
SimTongCalendar(
178176
modifier = Modifier
179177
.fillMaxWidth()
180-
.height(HomeCalendarHeight)
181178
.simClickable(
182179
rippleEnabled = false,
183180
) {

feature/feature-home/src/main/java/com/comit/feature_home/screen/schedule/ShowScheduleScreen.kt

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import androidx.compose.ui.Modifier
3636
import androidx.compose.ui.geometry.Offset
3737
import androidx.compose.ui.res.painterResource
3838
import androidx.compose.ui.res.stringResource
39-
import androidx.compose.ui.unit.Dp
4039
import androidx.compose.ui.unit.dp
4140
import androidx.hilt.navigation.compose.hiltViewModel
4241
import androidx.navigation.NavController
@@ -69,16 +68,12 @@ import kotlinx.coroutines.InternalCoroutinesApi
6968
import kotlinx.coroutines.launch
7069
import java.time.LocalDate
7170
import java.time.format.DateTimeFormatter
72-
import java.util.Calendar
73-
import java.util.GregorianCalendar
7471
import java.util.UUID
7572

7673
private val HorizontalPadding = PaddingValues(
7774
horizontal = 30.dp,
7875
)
7976

80-
private val HomeCalendarHeight: Dp = 343.dp
81-
8277
private val CalendarPadding = PaddingValues(
8378
horizontal = 20.dp,
8479
)
@@ -95,25 +90,8 @@ fun ShowScheduleScreen(
9590
val showScheduleState = showScheduleContainer.stateFlow.collectAsState().value
9691
val showScheduleSideEffect = showScheduleContainer.sideEffectFlow
9792

98-
val today = GregorianCalendar()
99-
val calendar = GregorianCalendar(
100-
today.get(Calendar.YEAR),
101-
today.get(Calendar.MONTH),
102-
today.get(Calendar.DATE)
103-
)
10493
var checkMonth by remember { mutableStateOf(0) }
10594

106-
// var date by remember {
107-
// mutableStateOf<Date>(
108-
// Date.valueOf(
109-
// string.format("%02d", calendar.get(Calendar.YEAR)) +
110-
// "-" +
111-
// string.format("%02d", calendar.get(Calendar.MONTH) + 1) +
112-
// "-01"
113-
// )
114-
// )
115-
// }
116-
11795
LaunchedEffect(showScheduleViewModel) {
11896
showScheduleViewModel.showSchedule(
11997
startAt = getStartAt(checkMonth),
@@ -262,6 +240,9 @@ fun ShowScheduleScreen(
262240
Spacer(modifier = Modifier.height(20.dp))
263241

264242
SimTongCalendar(
243+
modifier = Modifier
244+
.fillMaxWidth()
245+
.padding(CalendarPadding),
265246
onBeforeClicked = { _, _checkMonth ->
266247
checkMonth = _checkMonth
267248
showScheduleViewModel.showSchedule(
@@ -276,10 +257,6 @@ fun ShowScheduleScreen(
276257
endAt = getEndAt(checkMonth)
277258
)
278259
},
279-
modifier = Modifier
280-
.fillMaxWidth()
281-
.height(HomeCalendarHeight)
282-
.padding(CalendarPadding),
283260
)
284261

285262
Spacer(modifier = Modifier.height(7.dp))

0 commit comments

Comments
 (0)