diff --git a/.idea/misc.xml b/.idea/misc.xml index cd7974cb7..25b9e42b7 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4bd29bf81..7488122a0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,6 +21,7 @@ android { getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro", ) + signingConfig = signingConfigs.getByName("debug") } } } diff --git a/app/src/main/java/com/wap/wapp/MainActivity.kt b/app/src/main/java/com/wap/wapp/MainActivity.kt index 3152553eb..1caf56f4e 100644 --- a/app/src/main/java/com/wap/wapp/MainActivity.kt +++ b/app/src/main/java/com/wap/wapp/MainActivity.kt @@ -1,23 +1,22 @@ package com.wap.wapp +import android.content.res.Resources import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.SystemBarStyle import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge -import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.systemBars import androidx.compose.material3.Scaffold import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.dp import androidx.navigation.NavController import androidx.navigation.NavGraph.Companion.findStartDestination @@ -51,9 +50,10 @@ class MainActivity : ComponentActivity() { setContent { WappTheme { val navController = rememberNavController() + val density = LocalDensity.current + val navigationBarHeight = getNavigationBarHeight(density) Scaffold( - modifier = Modifier.fillMaxSize(), containerColor = WappTheme.colors.backgroundBlack, bottomBar = { val navBackStackEntry by @@ -69,11 +69,6 @@ class MainActivity : ComponentActivity() { }, ) - val systemBars = WindowInsets.systemBars - val density = LocalDensity.current - val bottomPadding = - remember { with(density) { systemBars.getBottom(this).toDp() } } - WappBottomBar( currentRoute = currentRoute, bottomBarState = bottomBarState, @@ -83,11 +78,12 @@ class MainActivity : ComponentActivity() { destination, ) }, - modifier = Modifier - .padding(bottom = bottomPadding) - .height(70.dp), + modifier = Modifier.height(70.dp), ) }, + modifier = Modifier + .padding(bottom = navigationBarHeight) + .fillMaxSize(), ) { innerPadding -> WappNavHost( signInUseCase = signInUseCase, @@ -118,7 +114,7 @@ private fun handleBottomBarState( ManagementSurveyRoute.surveyFormRegistrationRoute -> setBottomBarState(false) ManagementSurveyRoute.surveyFormEditRoute("{id}") -> setBottomBarState(false) eventRegistrationNavigationRoute -> setBottomBarState(false) - SurveyRoute.answerRoute("{id}") ->setBottomBarState(false) + SurveyRoute.answerRoute("{id}") -> setBottomBarState(false) else -> setBottomBarState(true) } @@ -134,3 +130,15 @@ private fun navigateToTopLevelDestination( restoreState = true } } + +private fun getNavigationBarHeight(density: Density) = with(density) { + Resources.getSystem().run { + getDimensionPixelSize( + getIdentifier( + "navigation_bar_height", + "dimen", + "android", + ), + ).toDp() + } +} diff --git a/core/designsystem/src/main/java/com/wap/designsystem/component/SubTopBar.kt b/core/designsystem/src/main/java/com/wap/designsystem/component/SubTopBar.kt index 2803c9dec..ade79e523 100644 --- a/core/designsystem/src/main/java/com/wap/designsystem/component/SubTopBar.kt +++ b/core/designsystem/src/main/java/com/wap/designsystem/component/SubTopBar.kt @@ -97,7 +97,7 @@ fun WappSubTopBarWithRightButton() { WappSubTopBar( modifier = Modifier .fillMaxWidth() - .padding(16.dp), + .padding(vertical = 16.dp), titleRes = R.string.notice, showRightButton = true, ) @@ -115,7 +115,7 @@ fun WappSubTopBarWithLeftButton() { WappSubTopBar( modifier = Modifier .fillMaxWidth() - .padding(16.dp), + .padding(vertical = 16.dp), titleRes = R.string.notice, showLeftButton = true, ) @@ -133,7 +133,7 @@ fun WappSubTopBarWithBothButton() { WappSubTopBar( modifier = Modifier .fillMaxWidth() - .padding(16.dp), + .padding(vertical = 16.dp), titleRes = R.string.notice, showRightButton = true, showLeftButton = true, diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt index fddce60ad..c30008d3c 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt @@ -86,9 +86,7 @@ internal fun SignUpScreen( .padding(horizontal = 16.dp), ) { WappSubTopBar( - modifier = Modifier - .fillMaxWidth() - .padding(vertical = 16.dp), + modifier = Modifier.fillMaxWidth(), titleRes = string.sign_up, showLeftButton = true, onClickLeftButton = { navigateToSignIn() }, diff --git a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/edit/EventEditScreen.kt b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/edit/EventEditScreen.kt index 6687d38ce..93475723e 100644 --- a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/edit/EventEditScreen.kt +++ b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/edit/EventEditScreen.kt @@ -175,7 +175,7 @@ internal fun EventEditScreen( modifier = Modifier .fillMaxSize() .padding(paddingValues) - .padding(16.dp), + .padding(vertical = 16.dp), ) { WappSubTopBar( titleRes = R.string.event_edit, @@ -187,12 +187,12 @@ internal fun EventEditScreen( EventEditStateIndicator( eventRegistrationState = currentEditState, - modifier = Modifier.padding(top = 16.dp), + modifier = Modifier.padding(top = 16.dp, start = 20.dp, end = 20.dp), ) EventRegistrationContent( eventRegistrationState = currentEditState, - modifier = Modifier.padding(top = 50.dp), + modifier = Modifier.padding(top = 50.dp, start = 20.dp, end = 20.dp), eventTitle = title, eventContent = content, location = location, diff --git a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationContent.kt b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationContent.kt index ede3001ec..759a93fae 100644 --- a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationContent.kt +++ b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationContent.kt @@ -165,7 +165,7 @@ private fun EventDetailsContent( WappButton( onClick = onNextButtonClicked, textRes = R.string.next, - modifier = Modifier.padding(vertical = 20.dp), + modifier = Modifier.padding(top = 20.dp), ) } } @@ -311,7 +311,6 @@ private fun EventScheduleContent( WappButton( onClick = onRegisterButtonClicked, textRes = R.string.register_event, - modifier = Modifier.padding(bottom = 20.dp), ) } } diff --git a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt index 587c2e704..16a53c441 100644 --- a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt +++ b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt @@ -149,7 +149,6 @@ internal fun EventRegistrationScreen( titleRes = R.string.event_registration, showLeftButton = true, onClickLeftButton = onBackButtonClicked, - modifier = Modifier.padding(start = 10.dp), ) EventRegistrationStateIndicator( diff --git a/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyFormStateIndicator.kt b/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyFormStateIndicator.kt index 2b4b55caa..48696ba9c 100644 --- a/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyFormStateIndicator.kt +++ b/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyFormStateIndicator.kt @@ -18,10 +18,12 @@ import com.wap.designsystem.WappTheme @Composable internal fun SurveyFormStateIndicator( surveyRegistrationState: SurveyFormState, + modifier: Modifier = Modifier, ) { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp), + modifier = modifier, ) { SurveyRegistrationStateProgressBar(surveyRegistrationState.progress) SurveyRegistrationStateText(surveyRegistrationState.page) diff --git a/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/registration/SurveyFormRegistrationScreen.kt b/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/registration/SurveyFormRegistrationScreen.kt index 970e4d782..287559011 100644 --- a/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/registration/SurveyFormRegistrationScreen.kt +++ b/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/registration/SurveyFormRegistrationScreen.kt @@ -97,6 +97,7 @@ internal fun SurveyRegistrationScreen( ) { SurveyFormStateIndicator( surveyRegistrationState = currentRegistrationState, + modifier = Modifier.padding(horizontal = 20.dp), ) SurveyFormContent( diff --git a/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementScreen.kt b/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementScreen.kt index 84b817fff..23202bcf8 100644 --- a/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementScreen.kt +++ b/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementScreen.kt @@ -1,6 +1,6 @@ - package com.wap.wapp.feature.management +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material3.Scaffold @@ -15,6 +15,7 @@ import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.wap.designsystem.WappTheme @@ -44,7 +45,7 @@ internal fun ManagementRoute( viewModel.userRole.collectLatest { userRoleUiState -> when (userRoleUiState) { - is ManagementViewModel.UserRoleUiState.Init -> { } + is ManagementViewModel.UserRoleUiState.Init -> {} is ManagementViewModel.UserRoleUiState.Success -> { when (userRoleUiState.userRole) { UserRole.GUEST -> { showGuestScreen = true } @@ -56,9 +57,7 @@ internal fun ManagementRoute( } viewModel.errorFlow.collectLatest { throwable -> - snackBarHostState.showSnackbar( - message = throwable.toSupportingText(), - ) + snackBarHostState.showSnackbar(message = throwable.toSupportingText()) } } @@ -101,6 +100,7 @@ internal fun ManagementScreen( Scaffold( containerColor = WappTheme.colors.backgroundBlack, snackbarHost = { SnackbarHost(snackBarHostState) }, + contentWindowInsets = WindowInsets(0.dp), topBar = { WappLeftMainTopBar( titleRes = R.string.management, @@ -108,9 +108,7 @@ internal fun ManagementScreen( ) }, ) { paddingValues -> - LazyColumn( - modifier = Modifier.padding(paddingValues), - ) { + LazyColumn(modifier = Modifier.padding(paddingValues)) { item { ManagementEventCard( eventsState = eventsState, diff --git a/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementSurveyCard.kt b/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementSurveyCard.kt index 3e347832e..89deda343 100644 --- a/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementSurveyCard.kt +++ b/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementSurveyCard.kt @@ -44,7 +44,7 @@ internal fun ManagementSurveyCard( containerColor = WappTheme.colors.black25, ), modifier = Modifier - .padding(top = 20.dp) + .padding(vertical = 20.dp) .padding(horizontal = 8.dp), ) { Column( diff --git a/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt b/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt index 02999c1af..b2a33ae3f 100644 --- a/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt +++ b/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt @@ -1,21 +1,28 @@ package com.wap.wapp.feature.notice +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.animateContentSize import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.IntrinsicSize import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.Divider import androidx.compose.material.Text +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.SheetState +import androidx.compose.material3.SheetValue import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -27,7 +34,6 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.wap.designsystem.WappTheme import com.wap.designsystem.component.CircleLoader -import com.wap.wapp.core.commmon.util.DateUtil import com.wap.wapp.core.commmon.util.DateUtil.HHmmFormatter import com.wap.wapp.core.commmon.util.DateUtil.MONTH_DATE_START_INDEX import com.wap.wapp.core.commmon.util.DateUtil.yyyyMMddFormatter @@ -36,9 +42,11 @@ import java.time.LocalDate import java.time.format.TextStyle import java.util.Locale +@OptIn(ExperimentalMaterial3Api::class) @Composable internal fun BottomSheetContent( expandableHeight: Dp, + bottomSheetState: SheetState, events: NoticeViewModel.EventsState, selectedDate: LocalDate, ) { @@ -56,21 +64,29 @@ internal fun BottomSheetContent( text = "$date $dayOfWeek", style = WappTheme.typography.titleBold, color = WappTheme.colors.white, - modifier = Modifier.padding(start = 15.dp, bottom = 15.dp), + modifier = Modifier.padding(start = 15.dp, bottom = 5.dp), ) - HandleEventsState(events = events) - } -} -@Composable -private fun HandleEventsState(events: NoticeViewModel.EventsState) = when (events) { - is NoticeViewModel.EventsState.Loading -> CircleLoader(modifier = Modifier.fillMaxWidth()) - is NoticeViewModel.EventsState.Success -> EventsList(events.events) - is NoticeViewModel.EventsState.Failure -> Unit + when (events) { + is NoticeViewModel.EventsState.Loading -> + CircleLoader(modifier = Modifier.fillMaxWidth()) + + is NoticeViewModel.EventsState.Success -> EventsList( + bottomSheetState = bottomSheetState, + events = events.events, + ) + + is NoticeViewModel.EventsState.Failure -> Unit + } + } } +@OptIn(ExperimentalMaterial3Api::class) @Composable -private fun EventsList(events: List) { +private fun EventsList( + bottomSheetState: SheetState, + events: List, +) { if (events.isNotEmpty()) { LazyColumn( contentPadding = PaddingValues(horizontal = 15.dp), @@ -81,7 +97,10 @@ private fun EventsList(events: List) { items = events, key = { event -> event.eventId }, ) { event -> - EventItem(event = event) + EventItem( + bottomSheetState = bottomSheetState, + event = event, + ) } } } else { @@ -107,49 +126,69 @@ private fun EventsList(events: List) { } } +@OptIn(ExperimentalMaterial3Api::class) @Composable -private fun EventItem(event: Event) { - Column { +private fun EventItem( + bottomSheetState: SheetState, + event: Event, +) { + Column(modifier = Modifier.animateContentSize()) { Row( - modifier = Modifier - .background(WappTheme.colors.black25) - .fillMaxWidth() - .padding(top = 5.dp), + horizontalArrangement = Arrangement.spacedBy(12.dp), verticalAlignment = Alignment.CenterVertically, + modifier = Modifier + .animateContentSize() + .padding(vertical = 10.dp) + .height(IntrinsicSize.Min) + .fillMaxWidth(), ) { Text( - text = event.startDateTime.toLocalTime().format(DateUtil.HHmmFormatter), + text = event.startDateTime.toLocalTime().format(HHmmFormatter), style = WappTheme.typography.contentBold, color = WappTheme.colors.white, ) - Box( + + Spacer( modifier = Modifier - .padding(10.dp) - .size(width = 4.dp, height = 20.dp) + .width(4.dp) + .animateContentSize() + .fillMaxHeight() .clip(RoundedCornerShape(10.dp)) .background(WappTheme.colors.yellow34), ) - Column( - horizontalAlignment = Alignment.Start, - modifier = Modifier.padding(start = 12.dp), - ) { + + Column(horizontalAlignment = Alignment.Start) { Text( text = event.title, style = WappTheme.typography.contentRegular, color = WappTheme.colors.white, ) + + AnimatedVisibility(bottomSheetState.currentValue == SheetValue.Expanded) { + Column(horizontalAlignment = Alignment.Start) { + Text( + text = event.location, + style = WappTheme.typography.captionRegular, + color = WappTheme.colors.yellow34, + ) + + Text( + text = event.content, + style = WappTheme.typography.captionRegular, + color = WappTheme.colors.grayBD, + ) + } + } + Text( text = event.startDateTime.format(HHmmFormatter) + " ~ " + event.endDateTime.format(HHmmFormatter), style = WappTheme.typography.captionRegular, - color = WappTheme.colors.grayBD, + color = WappTheme.colors.yellow34, ) } } - Divider( - color = WappTheme.colors.gray82, - thickness = 1.dp, - modifier = Modifier.padding(top = 15.dp), - ) + + Divider(color = WappTheme.colors.gray82) } } diff --git a/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt b/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt index 1ff3b2e44..9e4104236 100644 --- a/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt +++ b/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt @@ -53,6 +53,7 @@ internal fun Calendar( measureDefaultModifier: Modifier, measureExpandableModifier: Modifier, onDateSelected: (LocalDate) -> Unit, + onCalendarMonthChanged: () -> Unit, ) { Column( modifier = measureDefaultModifier, @@ -62,14 +63,27 @@ internal fun Calendar( bottomSheetState = bottomSheetState, selectedDate = selectedDate, onDateSelected = onDateSelected, + onCalendarMonthChanged = onCalendarMonthChanged, modifier = measureExpandableModifier, ) - handleMonthEventsState( - eventsState = monthEventsState, - selectedDate = selectedDate, - onDateSelected = onDateSelected, - ) + when (monthEventsState) { + is NoticeViewModel.EventsState.Loading -> + CircleLoader(modifier = Modifier.fillMaxSize()) + + is NoticeViewModel.EventsState.Success -> { + val eventDates = monthEventsState.events.map { + it.startDateTime.toLocalDate() + } + CalendarBody( + selectedDate = selectedDate, + eventsDate = eventDates, + onDateSelected = onDateSelected, + ) + } + + is NoticeViewModel.EventsState.Failure -> {} + } } } @@ -80,6 +94,7 @@ private fun CalendarHeader( bottomSheetState: SheetState, selectedDate: LocalDate, onDateSelected: (LocalDate) -> Unit, + onCalendarMonthChanged: () -> Unit, modifier: Modifier, ) = Box( modifier = modifier, @@ -110,7 +125,10 @@ private fun CalendarHeader( contentDescription = stringResource(id = R.string.backMonthArrowContentDescription), modifier = Modifier .padding(end = 20.dp) - .clickable { onDateSelected(selectedDate.minusMonths(1)) }, + .clickable { + onDateSelected(selectedDate.minusMonths(1)) + onCalendarMonthChanged() + }, ) Text( @@ -127,32 +145,14 @@ private fun CalendarHeader( contentDescription = stringResource(id = R.string.forwardMonthArrowContentDescription), modifier = Modifier .padding(start = 20.dp) - .clickable { onDateSelected(selectedDate.plusMonths(1)) }, + .clickable { + onDateSelected(selectedDate.plusMonths(1)) + onCalendarMonthChanged() + }, ) } } -@Composable -private fun handleMonthEventsState( - eventsState: NoticeViewModel.EventsState, - selectedDate: LocalDate, - onDateSelected: (LocalDate) -> Unit, -) = when (eventsState) { - is NoticeViewModel.EventsState.Loading -> CircleLoader(modifier = Modifier.fillMaxSize()) - is NoticeViewModel.EventsState.Success -> { - val eventDates = eventsState.events.map { - it.startDateTime.toLocalDate() - } - CalendarBody( - selectedDate = selectedDate, - eventsDate = eventDates, - onDateSelected = onDateSelected, - ) - } - - is NoticeViewModel.EventsState.Failure -> {} -} - @Composable private fun CalendarBody( selectedDate: LocalDate, diff --git a/feature/notice/src/main/java/com/wap/wapp/feature/notice/NoticeScreen.kt b/feature/notice/src/main/java/com/wap/wapp/feature/notice/NoticeScreen.kt index 066077c30..b11790176 100644 --- a/feature/notice/src/main/java/com/wap/wapp/feature/notice/NoticeScreen.kt +++ b/feature/notice/src/main/java/com/wap/wapp/feature/notice/NoticeScreen.kt @@ -34,8 +34,15 @@ internal fun NoticeRoute( val selectedDateEvents by viewModel.selectedDateEvents.collectAsStateWithLifecycle() val selectedDate by viewModel.selectedDate.collectAsStateWithLifecycle() val onDateSelected = viewModel::updateSelectedDate + val onCalendarMonthChanged = viewModel::getMonthEvents - NoticeScreen(MonthEvents, selectedDateEvents, selectedDate, onDateSelected) + NoticeScreen( + monthEvents = MonthEvents, + selectedDateEvents = selectedDateEvents, + selectedDate = selectedDate, + onDateSelected = onDateSelected, + onCalendarMonthChanged = onCalendarMonthChanged, + ) } @OptIn(ExperimentalMaterial3Api::class) @@ -45,6 +52,7 @@ internal fun NoticeScreen( selectedDateEvents: EventsState, selectedDate: LocalDate, onDateSelected: (LocalDate) -> Unit, + onCalendarMonthChanged: () -> Unit, ) { var defaultHeight: Dp by remember { mutableStateOf(0.dp) } var expandableHeight: Dp by remember { mutableStateOf(0.dp) } @@ -68,9 +76,10 @@ internal fun NoticeScreen( sheetPeekHeight = defaultHeight, sheetContent = { BottomSheetContent( - expandableHeight, - selectedDateEvents, - selectedDate, + expandableHeight = expandableHeight, + bottomSheetState = scaffoldState.bottomSheetState, + events = selectedDateEvents, + selectedDate = selectedDate, ) }, ) { @@ -80,6 +89,7 @@ internal fun NoticeScreen( selectedDate = selectedDate, monthEventsState = monthEvents, onDateSelected = onDateSelected, + onCalendarMonthChanged = onCalendarMonthChanged, measureDefaultModifier = Modifier .fillMaxWidth() .background(WappTheme.colors.black25) diff --git a/feature/notice/src/main/java/com/wap/wapp/feature/notice/NoticeViewModel.kt b/feature/notice/src/main/java/com/wap/wapp/feature/notice/NoticeViewModel.kt index fc3dfd97a..01b8a1321 100644 --- a/feature/notice/src/main/java/com/wap/wapp/feature/notice/NoticeViewModel.kt +++ b/feature/notice/src/main/java/com/wap/wapp/feature/notice/NoticeViewModel.kt @@ -33,7 +33,7 @@ class NoticeViewModel @Inject constructor( getSelectedDateEvents() } - private fun getMonthEvents() { + fun getMonthEvents() { _monthEvents.value = EventsState.Loading viewModelScope.launch { getMonthEventListUseCase(_selectedDate.value) @@ -42,7 +42,7 @@ class NoticeViewModel @Inject constructor( } } - fun getSelectedDateEvents() { + private fun getSelectedDateEvents() { _selectedDateEvents.value = EventsState.Loading viewModelScope.launch { getDateEventListUseCase(_selectedDate.value).onSuccess { eventList -> diff --git a/feature/profile/src/main/java/com/wap/wapp/feature/profile/profilesetting/ProfileSettingScreen.kt b/feature/profile/src/main/java/com/wap/wapp/feature/profile/profilesetting/ProfileSettingScreen.kt index 199dd36ac..f4602daf8 100644 --- a/feature/profile/src/main/java/com/wap/wapp/feature/profile/profilesetting/ProfileSettingScreen.kt +++ b/feature/profile/src/main/java/com/wap/wapp/feature/profile/profilesetting/ProfileSettingScreen.kt @@ -112,7 +112,7 @@ internal fun ProfileSettingScreen( titleRes = string.more, showLeftButton = true, onClickLeftButton = navigateToProfile, - modifier = Modifier.padding(top = 20.dp), + modifier = Modifier.padding(top = 16.dp), ) Row(