diff --git a/app/src/main/java/com/kuit/afternote/feature/dailyrecord/presentation/screen/RecordWeekendReportScreen.kt b/app/src/main/java/com/kuit/afternote/feature/dailyrecord/presentation/screen/RecordWeekendReportScreen.kt index 5f4904be..c33dcc83 100644 --- a/app/src/main/java/com/kuit/afternote/feature/dailyrecord/presentation/screen/RecordWeekendReportScreen.kt +++ b/app/src/main/java/com/kuit/afternote/feature/dailyrecord/presentation/screen/RecordWeekendReportScreen.kt @@ -61,7 +61,6 @@ fun RecordWeekendReportScreen( onBottomNavTabSelected: (BottomNavItem) -> Unit = {}, mindRecordViewModel: MindRecordViewModel = hiltViewModel() ) { - val weekState = mindRecordViewModel.totalSummary.collectAsStateWithLifecycle() val dailyState = mindRecordViewModel.dailyQuestionSummary.collectAsStateWithLifecycle() val afternoteState = mindRecordViewModel.afternoteSummary.collectAsStateWithLifecycle() @@ -99,36 +98,6 @@ fun RecordWeekendReportScreen( onBottomNavTabSelected(item) } ) - }, - floatingActionButton = { - FloatingActionButton( - onClick = { }, - modifier = Modifier.size(56.dp), - containerColor = Color.Transparent, - contentColor = Color.White, - shape = CircleShape - ) { - Box( - modifier = Modifier - .fillMaxSize() - .clip(CircleShape) - .background( - brush = Brush.linearGradient( - colors = listOf( - Color(0xFFBDE0FF), // B3 - Color(0xFFFFE1CC) // 주황색 계열 - ) - ) - ), - contentAlignment = Alignment.Center - ) { - Icon( - imageVector = Icons.Default.Add, - contentDescription = "새 애프터노트 추가", - modifier = Modifier.size(24.dp) - ) - } - } } ) { paddingValues -> LazyColumn( diff --git a/app/src/main/java/com/kuit/afternote/feature/home/presentation/component/RecipientBadge.kt b/app/src/main/java/com/kuit/afternote/feature/home/presentation/component/RecipientBadge.kt index 4563fd9c..7866120a 100644 --- a/app/src/main/java/com/kuit/afternote/feature/home/presentation/component/RecipientBadge.kt +++ b/app/src/main/java/com/kuit/afternote/feature/home/presentation/component/RecipientBadge.kt @@ -20,6 +20,7 @@ import androidx.compose.ui.unit.sp import com.kuit.afternote.R import com.kuit.afternote.ui.theme.AfternoteTheme import com.kuit.afternote.ui.theme.B3 +import com.kuit.afternote.ui.theme.Gray2 import com.kuit.afternote.ui.theme.Gray9 import com.kuit.afternote.ui.theme.Sansneo @@ -33,7 +34,7 @@ fun RecipientBadge( Surface( modifier = modifier, shape = RoundedCornerShape(20.dp), - color = B3, + color = if (showCheckIcon) B3 else Gray2, onClick = onCLick ) { Row( @@ -48,15 +49,31 @@ fun RecipientBadge( modifier = Modifier.size(12.dp), tint = androidx.compose.ui.graphics.Color.Unspecified ) + Text( + text = text, + fontFamily = Sansneo, + fontWeight = FontWeight.Medium, + fontSize = 12.sp, + lineHeight = 18.sp, + color = Gray9 + ) + } + else { + Icon( + painter = painterResource(R.drawable.unchecked), + contentDescription = null, + modifier = Modifier.size(12.dp), + tint = androidx.compose.ui.graphics.Color.Unspecified + ) + Text( + text = "수신인 지정 미완료", + fontFamily = Sansneo, + fontWeight = FontWeight.Medium, + fontSize = 12.sp, + lineHeight = 18.sp, + color = Gray9 + ) } - Text( - text = text, - fontFamily = Sansneo, - fontWeight = FontWeight.Medium, - fontSize = 12.sp, - lineHeight = 18.sp, - color = Gray9 - ) } } } diff --git a/app/src/main/java/com/kuit/afternote/feature/home/presentation/screen/HomeScreen.kt b/app/src/main/java/com/kuit/afternote/feature/home/presentation/screen/HomeScreen.kt index 7c58c2d6..34feb9d1 100644 --- a/app/src/main/java/com/kuit/afternote/feature/home/presentation/screen/HomeScreen.kt +++ b/app/src/main/java/com/kuit/afternote/feature/home/presentation/screen/HomeScreen.kt @@ -40,6 +40,7 @@ import com.kuit.afternote.feature.home.presentation.component.WeeklyCalendarStri import com.kuit.afternote.feature.user.presentation.uimodel.ProfileUiState import com.kuit.afternote.feature.user.presentation.viewmodel.ProfileEditViewModelContract import com.kuit.afternote.feature.user.presentation.viewmodel.ProfileViewModel +import com.kuit.afternote.feature.user.presentation.viewmodel.ReceiverListViewModel import com.kuit.afternote.ui.theme.AfternoteTheme import com.kuit.afternote.ui.theme.Gray1 import com.kuit.afternote.ui.theme.Gray5 @@ -75,21 +76,26 @@ fun HomeScreen( modifier: Modifier = Modifier, event: HomeScreenEvent = EmptyHomeScreenEvent, profileViewModel: ProfileEditViewModelContract = hiltViewModel(), - recordViewModel: MindRecordHomeContract = hiltViewModel() + recordViewModel: MindRecordHomeContract = hiltViewModel(), + mindRecordViewModel: MindRecordViewModel = hiltViewModel(), + receiverListViewModel: ReceiverListViewModel = hiltViewModel() ) { var content by remember { mutableStateOf(HomeScreenContent()) } val uiState = profileViewModel.uiState.collectAsStateWithLifecycle() val recordUiState = recordViewModel.calendarDays.collectAsStateWithLifecycle() + val receiverState = receiverListViewModel.uiState.collectAsStateWithLifecycle() + val dailyState = mindRecordViewModel.uiState.collectAsStateWithLifecycle() LaunchedEffect(Unit) { profileViewModel.loadProfile() recordViewModel.loadRecordsForDiaryList() - - + mindRecordViewModel.loadDailyQuestion() + receiverListViewModel.loadReceivers() content = content.copy( userName = uiState.value.name, dailyQuestionDate = LocalDate.now().format(DateTimeFormatter.ofPattern("M월 d일", Locale.KOREAN)), - calendarDays = recordUiState.value + calendarDays = recordUiState.value, + dailyQuestion = dailyState.value.dailyQuestionText ?: "오늘 하루,\n누구에게 가장 고마웠나요?" ) } @@ -121,7 +127,8 @@ fun HomeScreen( // Recipient badge RecipientBadge( - modifier = Modifier.padding(horizontal = 20.dp) + modifier = Modifier.padding(horizontal = 20.dp), + showCheckIcon = !receiverState.value.receivers.isEmpty() ) Spacer(modifier = Modifier.height(20.dp)) diff --git a/app/src/main/res/drawable/unchecked.png b/app/src/main/res/drawable/unchecked.png new file mode 100644 index 00000000..49461f9c Binary files /dev/null and b/app/src/main/res/drawable/unchecked.png differ