Skip to content

Commit

Permalink
✨ 현재 달리는 팔로잉 보여주기 화면 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
yonghanJu committed Oct 20, 2023
1 parent f294a3a commit e408191
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ fun RunningScreen(
LaunchedEffect(LocalLifecycleOwner.current) {
viewModel.startWorker = startWorker
viewModel.getRunningState()
viewModel.getRunningFollowingsState()
viewModel.onTrackingButtonClicked()
}

Expand All @@ -122,6 +123,7 @@ fun RunningScreen(
viewModel::selectImage,
viewModel::saveHistory,
viewModel::takeSnapShot,
viewModel::sendLike,
)
}

Expand All @@ -139,6 +141,7 @@ fun RunningContent(
selectImage: (Uri) -> Unit,
saveHistory: (Bitmap, RunningFinishData) -> Unit,
onTakeSnapShot: (RunningFinishData) -> Unit,
onSendLike: (uid: Long) -> Unit,
) {
Column(
modifier = Modifier.fillMaxHeight(),
Expand All @@ -151,6 +154,7 @@ fun RunningContent(
onEditOpen,
onEditClose,
saveHistory,
onSendLike,
)
RunningInfoScreen(
modifier = Modifier.height(280.dp),
Expand Down Expand Up @@ -186,6 +190,7 @@ fun RunningMapScreen(
onEditOpen: () -> Unit,
onEditClose: () -> Unit,
onSaveHistory: (Bitmap, RunningFinishData) -> Unit,
onSendLike: (uid: Long) -> Unit,
) {
var mapProperties by remember {
mutableStateOf(
Expand Down Expand Up @@ -477,8 +482,21 @@ fun RunningMapScreen(
}

LazyRow {
repeat(10) {
item { RunningFollowerItemWithLikable(onClick = { Result.success(Unit) }) }
state.runningFollowerState.getDataOrNull()?.let { (running, notRunning) ->
items(running.size) {
RunningFollowerItemWithLikable(
user = running[it].user,
onClick = onSendLike,
circleBorderColor = WalkieColor.Primary,
isLiked = running[it].isLiked,
)
}
items(notRunning.size) {
RunningFollowerItemWithLikable(
user = running[it].user,
circleBorderColor = WalkieColor.GrayBorder,
)
}
}
}
}
Expand Down

0 comments on commit e408191

Please sign in to comment.