Skip to content
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
97e2c5d
feat: 이번달 챙길사람 전체보기 화면 네비게이션 추가
stopstone Oct 31, 2025
525fc6b
feat: 월별 리마인더 친구 카드 컴포저블 추가
stopstone Oct 31, 2025
2daa449
feat: 월별 리마인더 화면 빈 상태 컴포저블 추가
stopstone Oct 31, 2025
1bc2ad3
feat: 월별 리마인더 완료 목록 아이템 컴포저블 추가
stopstone Oct 31, 2025
7dc900c
refactor: 월별 리마인더 전체보기 화면 파일 이동 및 ViewModel 연결
stopstone Nov 1, 2025
19cf75d
feat: 이번달 챙길 사람 전체보기 화면 구현
stopstone Nov 1, 2025
eb7cf4c
feat: 이달의 챙김 친구 카드 UI 모델 적용
stopstone Nov 1, 2025
d85077a
feat: iewModel 및 UI State 구현
stopstone Nov 1, 2025
7f86285
feat: 이달의 챙김 완료 친구 목록 조회 API 추가
stopstone Nov 1, 2025
1bf63ed
chore: MonthlyReminderFriendCard 패딩 삭제
stopstone Nov 1, 2025
05ac850
feat: 챙김 완료 목록 아이템 UI 구현
stopstone Nov 1, 2025
5b178df
feat: 챙김 완료 목록 추가
stopstone Nov 1, 2025
767fe0c
feat: 연락 기록 성공 다이얼로그 추가
stopstone Nov 1, 2025
761cdaf
refactor: 챙김 친구 완료 시 UI 즉시 업데이트
stopstone Nov 1, 2025
7a7334d
refactor: 월별 리마인더 없음 화면 UI 수정
stopstone Nov 1, 2025
39c7efc
refactor: 이번달 챙길 사람 화면 문자열 리소스 적용
stopstone Nov 1, 2025
b7146ad
refactor: 이번달 챙길 사람 화면 챙김 완료 상단 패딩 수정
stopstone Nov 3, 2025
6e8b124
refactor: 연락 완료 여부 확인 로직을 uiState로 관리
stopstone Nov 3, 2025
8409fed
refactor: 이번달 챙길 사람 화면 간격 추가
stopstone Nov 5, 2025
3b8db78
feat: 이번달 챙길 사람 리스트 정렬
stopstone Nov 5, 2025
3c61c80
refactor: 월별 리마인더 데이터 로딩 로직 개선
stopstone Nov 7, 2025
3cd540b
refactor: 홈 화면 "전체 보기" 텍스트를 문자열 리소스로 분리
stopstone Nov 7, 2025
0f0ec16
refactor: 에러 처리 방식 개선
stopstone Nov 7, 2025
de9c02c
refactor: Flow 에러 처리 로직 공통화
stopstone Nov 7, 2025
42fabc6
refactor: 기록 완료 다이얼로그 색상 수정
stopstone Nov 7, 2025
61d61ac
chore: MonthlyReminderFriendCard.kt 코드 스타일 수정
stopstone Nov 7, 2025
31a0e66
refactor: 이번달 챙길사람 하단 패딩 수정
stopstone Nov 7, 2025
1672ffa
chore: "D-day"를 "D-DAY"로 수정
stopstone Nov 7, 2025
c9c4326
feat: 연락일이 오늘일 경우 D-day 스타일 적용 및 중복 데이터 제거
stopstone Nov 7, 2025
be85484
refactor: MonthlyReminderAllScreen의 불필요한 launch 제거
stopstone Nov 10, 2025
186e13b
refactor: MonthlyReminderAllViewModel 내 불필요한 private backing property 제거
stopstone Nov 10, 2025
49e421e
refactor: updateUIState 함수의 이름 변경
stopstone Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ class DefaultFriendRepository
)
}

override fun fetchMonthlyCompleteFriends(): Flow<List<MonthlyFriend>> =
apiCallFlow {
friendService.fetchMonthlyCompleteFriends().map { it.toModel() }
}

override fun fetchFriendById(friendId: String): Flow<Friend> =
flow {
emit(friendService.fetchFriendById(friendId).toModel())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package com.alarmy.near.data.repository

import com.alarmy.near.model.Friend
import com.alarmy.near.model.FriendRecord
import com.alarmy.near.network.response.FriendInitItemEntity
import com.alarmy.near.model.friendsummary.FriendSummary
import com.alarmy.near.model.monthly.MonthlyFriend
import com.alarmy.near.network.response.FriendInitItemEntity
import com.alarmy.near.presentation.feature.friendcontactcycle.model.FriendContactUIModel
import kotlinx.coroutines.flow.Flow

Expand All @@ -13,6 +13,8 @@ interface FriendRepository {

fun fetchMonthlyFriends(): Flow<List<MonthlyFriend>>

fun fetchMonthlyCompleteFriends(): Flow<List<MonthlyFriend>>

fun fetchFriendById(friendId: String): Flow<Friend>

fun updateFriend(
Expand All @@ -26,5 +28,8 @@ interface FriendRepository {

fun recordContact(friendId: String): Flow<String>

fun initFriends(contacts: List<FriendContactUIModel>, providerType: String): Flow<List<FriendInitItemEntity>>
fun initFriends(
contacts: List<FriendContactUIModel>,
providerType: String,
): Flow<List<FriendInitItemEntity>>
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data class MonthlyFriend(
fun daysUntilNextContact(today: LocalDate): String {
val daysBetween = getDaysBetween(today)
return when {
daysBetween == 0L -> "D-day"
daysBetween == 0L -> "D-DAY"
daysBetween > 0L -> "D-$daysBetween"
else -> "D+${-daysBetween}" // 과거 날짜
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ interface FriendService {
@GET("/friend/monthly")
suspend fun fetchMonthlyFriends(): List<MonthlyFriendEntity>

@GET("/friend/monthly/complete")
suspend fun fetchMonthlyCompleteFriends(): List<MonthlyFriendEntity>

@GET("/friend/{friendId}")
suspend fun fetchFriendById(
@Path("friendId") friendId: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.paint
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.res.painterResource
Expand Down Expand Up @@ -74,6 +76,7 @@ internal fun HomeRoute(
onAlarmClick: () -> Unit = {},
onMyPageClick: () -> Unit = {},
onAddContactClick: () -> Unit = {},
onMonthlyReminderAllClick: () -> Unit = {},
) {
LaunchedEffect(Unit) {
launch {
Expand All @@ -90,6 +93,7 @@ internal fun HomeRoute(
onAlarmClick = onAlarmClick,
onMyPageClick = onMyPageClick,
onAddContactClick = onAddContactClick,
onMonthlyReminderAllClick = onMonthlyReminderAllClick,
contacts = friends.value,
monthlyFriends = monthlyFriends.value,
memberInfo = memberInfo.value,
Expand All @@ -104,6 +108,7 @@ internal fun HomeScreen(
onMyPageClick: () -> Unit = {},
onAlarmClick: () -> Unit = {},
onAddContactClick: () -> Unit = {},
onMonthlyReminderAllClick: () -> Unit = {},
memberInfo: MemberInfo?,
contacts: List<FriendSummary>,
monthlyFriends: List<MonthlyFriend>,
Expand All @@ -130,7 +135,8 @@ internal fun HomeScreen(
R.drawable.img_bg,
),
contentScale = ContentScale.FillBounds,
).fillMaxSize(),
)
.fillMaxSize(),
) {
Spacer(modifier = Modifier.height(statusBarHeightDp))
Row(
Expand Down Expand Up @@ -174,12 +180,23 @@ internal fun HomeScreen(
color = NearTheme.colors.WHITE_FFFFFF,
)
Spacer(modifier = Modifier.height(32.dp))
Text(
text = stringResource(R.string.home_this_month_people),
modifier = Modifier.padding(horizontal = 24.dp),
style = NearTheme.typography.B1_16_BOLD,
color = NearTheme.colors.WHITE_FFFFFF,
)

Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(
text = stringResource(R.string.home_this_month_people),
modifier = Modifier.padding(horizontal = 24.dp),
style = NearTheme.typography.B1_16_BOLD,
color = NearTheme.colors.WHITE_FFFFFF,
)

MonthlyReminderFriendsViewAll(
modifier = Modifier.padding(horizontal = 24.dp),
onMonthlyReminderAllClick = onMonthlyReminderAllClick,
)
}
Spacer(modifier = Modifier.height(16.dp))
if (monthlyFriends.isEmpty()) {
Surface(
Expand Down Expand Up @@ -370,6 +387,36 @@ private fun PagerIndicator(pagerState: PagerState) {
}
}

@Composable
fun MonthlyReminderFriendsViewAll(
modifier: Modifier = Modifier,
onMonthlyReminderAllClick: () -> Unit = {},
) {
Row(
modifier =
modifier.onNoRippleClick(
onClick = onMonthlyReminderAllClick,
),
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = stringResource(R.string.home_monthly_friends_all),
style = NearTheme.typography.B2_14_MEDIUM,
color = NearTheme.colors.WHITE_FFFFFF,
modifier = Modifier.alpha(0.8f),
)

Spacer(modifier = Modifier.size(6.dp))

Image(
painter = painterResource(id = R.drawable.ic_front_8),
colorFilter = ColorFilter.tint(NearTheme.colors.WHITE_FFFFFF),
alpha = 1f,
contentDescription = null,
)
}
}

@Preview
@Composable
internal fun HomeScreenPreview() {
Expand Down Expand Up @@ -408,3 +455,11 @@ internal fun HomeScreenPreview() {
)
}
}

@Preview
@Composable
fun MonthlyReminderFriendsViewAllPreview() {
NearTheme {
MonthlyReminderFriendsViewAll()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
import androidx.navigation.compose.composable
import com.alarmy.near.model.Friend
import com.alarmy.near.presentation.feature.friendprofile.FriendProfileViewModel
import com.alarmy.near.presentation.feature.friendprofileedittor.navigation.FRIEND_PROFILE_EDIT_COMPLETE_KEY
import com.alarmy.near.presentation.feature.home.HomeRoute
import com.alarmy.near.presentation.feature.home.HomeViewModel
import kotlinx.serialization.Serializable
Expand All @@ -30,6 +27,7 @@ fun NavGraphBuilder.homeNavGraph(
onAlarmClick: () -> Unit = {},
onMyPageClick: () -> Unit = {},
onAddContactClick: () -> Unit = {},
onMonthlyReminderAllClick: () -> Unit = {},
) {
composable<RouteHome> { backStackEntry ->
val viewModel: HomeViewModel = hiltViewModel()
Expand All @@ -43,6 +41,7 @@ fun NavGraphBuilder.homeNavGraph(
onAlarmClick = onAlarmClick,
onMyPageClick = onMyPageClick,
onAddContactClick = onAddContactClick,
onMonthlyReminderAllClick = onMonthlyReminderAllClick,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import com.alarmy.near.presentation.feature.home.navigation.homeNavGraph
import com.alarmy.near.presentation.feature.home.navigation.navigateToHome
import com.alarmy.near.presentation.feature.login.navigation.loginNavGraph
import com.alarmy.near.presentation.feature.login.navigation.navigateToLogin
import com.alarmy.near.presentation.feature.mothlyreminderall.navigation.monthlyReminderAllNavGraph
import com.alarmy.near.presentation.feature.mothlyreminderall.navigation.navigateToMonthlyReminderAll
import com.alarmy.near.presentation.feature.myprofile.navigation.myProfileNavGraph
import com.alarmy.near.presentation.feature.myprofile.navigation.navigateToMyProfile
import com.alarmy.near.presentation.feature.myprofile.navigation.navigateToWebView
Expand Down Expand Up @@ -87,6 +89,12 @@ internal fun NearNavHost(
onMyPageClick = { navController.navigateToMyProfile() },
onAlarmClick = {},
onAddContactClick = { navController.navigateToFriendContactCycle() },
onMonthlyReminderAllClick = { navController.navigateToMonthlyReminderAll() },
)

monthlyReminderAllNavGraph(
onShowErrorSnackBar = onShowSnackbar,
onNavigateBack = { navController.popBackStack() },
)

myProfileNavGraph(
Expand Down
Loading