Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6236b0b
[fix/#117] ํ•˜๋‹จ ํŒจ๋”ฉ ์ˆ˜์ •
jyvnee Jan 22, 2026
ad14754
[fix/#117] ํ™ˆ ๋ฐฐ๋„ˆ ํด๋ฆญ ์‚ญ์ œ
jyvnee Jan 22, 2026
268bb9f
[fix/#117] ๋กœ๊ณ  ์ˆ˜์ •
jyvnee Jan 22, 2026
1aeb498
[fix/#117] ๋กœ๊ณ  ์ˆ˜์ •
jyvnee Jan 22, 2026
a5bef6c
[fix/#117] ๋งˆ์ดํŽ˜์ด์ง€ -> ์•„ํ‹ฐ์ŠคํŠธ ์„ ํƒ ์ด๋™ ์‚ญ์ œ
jyvnee Jan 22, 2026
1c2b1f9
[fix/#117] ์•„ํ‹ฐ์ŠคํŠธ ๊ฒ€์ƒ‰ ํŒจ๋”ฉ ์ˆ˜์ •
jyvnee Jan 22, 2026
b40b63f
[fix/#117] ๋žŒ๋‹ค ์ด๋ฆ„ ์ˆ˜์ •
jyvnee Jan 22, 2026
e0101cc
Merge branch 'develop' into fix/#117-ui-qa
jyvnee Jan 22, 2026
b7a20c0
[fix/#117] ํ™”๋ฉด ์ด๋™ ํŒŒ๋ผ๋ฏธํ„ฐ ์ˆ˜์ •
jyvnee Jan 22, 2026
3eacd3c
[fix/#117] user dto ์ˆ˜์ •
jyvnee Jan 22, 2026
68d10f5
[fix/#117] ์ฐธ์—ฌ/๋ถ„์ฒ  ๋‚ด์—ญ ์ดˆ๊ธฐ ์ƒํƒœ ์„ค์ •
jyvnee Jan 22, 2026
6c30748
Merge branch 'develop' into fix/#117-ui-qa
jyvnee Jan 22, 2026
d15ef9b
[fix/#117] ํŒจํ‚ค์ง€ ๋ถ„๋ฆฌ
jyvnee Jan 22, 2026
f8b166c
[fix/#117] ๋ถ„์ฒ  ๋‚ด์—ญ id ๋ฌธ์ œ ์ˆ˜์ •
jyvnee Jan 22, 2026
a948c49
[fix/#117] ํ”Œ๋กœํŒ… ๋ฒ„ํŠผ ํŒจ๋”ฉ ์ˆ˜์ •
jyvnee Jan 22, 2026
885e721
[fix/#117] ๋‹ค๋ฅธ ๊ตฟ์ฆˆ ๊ตฌ๊ฒฝํ•˜๊ธฐ ์—ฐ๊ฒฐ
jyvnee Jan 22, 2026
d86eb33
Merge branch 'develop' into fix/#117-ui-qa
jyvnee Jan 22, 2026
2b03da5
[fix/#115] ์•„ํ‹ฐ์ŠคํŠธ nullable ๋ณ€๊ฒฝ
jyvnee Jan 22, 2026
f75b196
[fix/#115] ์ถ”์ฒœ ๊ตฟ์ฆˆ ํ—ค๋” ์ˆ˜์ •
jyvnee Jan 22, 2026
d90c797
[fix/#117] ๊ธ€์ž ์ˆ˜์ •
jyvnee Jan 22, 2026
50f2ea8
[fix/#117] ํŽ˜์ด์ง€๋„ค์ด์…˜ ๊ฐœ์ˆ˜ ์ˆ˜์ •
jyvnee Jan 22, 2026
5edc885
[fix/#117] ๊ฐ€๊ฒฉ ํฌ๋งทํŒ…
jyvnee Jan 23, 2026
86fc277
[fix/#117] ์ƒˆ๋กœ๊ณ ์นจ
jyvnee Jan 23, 2026
7065a39
[fix/#117] ๋ฐ์ดํ„ฐ ๋กœ๋“œ ์ˆ˜์ •
jyvnee Jan 23, 2026
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 @@ -61,7 +61,7 @@ fun PotiHeaderPage(
subTitle?.let {
Text(
text = subTitle,
style = PotiTheme.typography.caption10m.copy(
style = PotiTheme.typography.caption12m.copy(
lineHeight = 1.35.em,
),
color = PotiTheme.colors.gray700,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fun PotiHeaderPrimary(
)
} else {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_logo),
imageVector = ImageVector.vectorResource(R.drawable.ic_poti_logo),
contentDescription = null,
tint = Color.Unspecified,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.poti.android.data.mapper.home

import com.poti.android.data.remote.dto.response.home.GoodsCategoryResponseDto
import com.poti.android.data.remote.dto.response.home.GroupItemDto
import com.poti.android.domain.model.party.GoodsCategory
import com.poti.android.domain.model.party.GroupItem
import com.poti.android.domain.model.party.ProductCategory

fun GoodsCategoryResponseDto.toDomain(): GoodsCategory =
GoodsCategory(
fun GoodsCategoryResponseDto.toDomain(): ProductCategory =
ProductCategory(
nickname = nickname,
mainArtist = mainArtist,
mainArtistId = mainArtistId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import com.poti.android.domain.model.home.HomeContent

fun HomeResponseDto.toDomain(): HomeContent = HomeContent(
nickname = nickname,
mainArtist = mainArtist.orEmpty(),
mainArtistId = mainArtistId ?: 0L,
mainArtist = mainArtist,
mainArtistId = mainArtistId,
myGroupItems = myGroupItems.orEmpty().map { it.toDomain() },
otherGroupItems = otherGroupItems.map { it.toDomain() },
banners = banners.map { it.toDomain() },
Expand All @@ -20,7 +20,7 @@ fun HomeResponseDto.toDomain(): HomeContent = HomeContent(
fun MyGroupItemDto.toDomain(): GroupItem = GroupItem(
postTitle = postTitle.orEmpty(),
artist = artist.orEmpty(),
artistId = artistId ?: 0L,
artistId = artistId ?: 0,
postImage = postImage.orEmpty(),
postCount = postCount ?: 0,
tag = tag.orEmpty(),
Expand All @@ -29,7 +29,7 @@ fun MyGroupItemDto.toDomain(): GroupItem = GroupItem(
fun OtherGroupItemDto.toDomain(): GroupItem = GroupItem(
postTitle = postTitle,
artist = artist,
artistId = artistId ?: 0L,
artistId = artistId ?: 0,
postImage = postImage.orEmpty(),
postCount = postCount,
tag = tag,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ private fun PartyDto.toDomain(): PartySummary =
PartySummary(
partyId = potId,
price = price,
goodsImageUrl = thumbnailUrl.orEmpty(),
productImageUrl = thumbnailUrl.orEmpty(),
currentCount = currentCount,
totalCount = totalCount,
availableMembers = availableMembers,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.poti.android.data.mapper.user

import com.poti.android.data.remote.dto.response.user.MyPageResponseDto
import com.poti.android.data.remote.dto.response.user.ParticipationSummaryDto
import com.poti.android.data.remote.dto.response.user.RecruitSummaryDto
import com.poti.android.domain.model.user.HistorySummary
import com.poti.android.domain.model.user.UserMyPage
import java.lang.String.format
import java.util.Locale
Expand All @@ -21,17 +18,3 @@ fun MyPageResponseDto.toDomain(): UserMyPage =
participationSummary = participationSummary.toDomain(),
recruitSummary = recruitSummary.toDomain(),
)

fun ParticipationSummaryDto.toDomain(): HistorySummary =
HistorySummary(
total = total,
inProgress = inProgress,
completed = completed,
)

fun RecruitSummaryDto.toDomain(): HistorySummary =
HistorySummary(
total = total,
inProgress = inProgress,
completed = completed,
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.poti.android.data.mapper
package com.poti.android.data.mapper.user

import com.poti.android.data.remote.dto.response.user.ProfileResponseDto
import com.poti.android.data.remote.dto.response.user.RecruitSummaryDto
import com.poti.android.data.remote.dto.response.user.ProfileSummaryDto
import com.poti.android.domain.model.user.HistorySummary
import com.poti.android.domain.model.user.UserProfile

Expand All @@ -18,7 +18,7 @@ fun ProfileResponseDto.toDomain(): UserProfile =
recruitSummary = recruitSummary.toDomain(),
)

fun RecruitSummaryDto.toDomain(): HistorySummary =
fun ProfileSummaryDto.toDomain(): HistorySummary =
HistorySummary(
total = total,
inProgress = inProgress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ data class OnboardingRequestDto(
@SerialName("nickname")
val nickname: String,
@SerialName("favoriteArtistId")
val favoriteArtistId: Long,
val favoriteArtistId: Long?,
)
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data class MyPageResponseDto(
@SerialName("favoriteArtistName")
val favoriteArtistName: String?,
@SerialName("participationSummary")
val participationSummary: ParticipationSummaryDto,
val participationSummary: ProfileSummaryDto,
@SerialName("recruitSummary")
val recruitSummary: RecruitSummaryDto,
val recruitSummary: ProfileSummaryDto,
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class OnboardingResponseDto(
@SerialName("nickname")
val nickname: String,
val nickname: String?,
@SerialName("favoriteArtistId")
val favoriteArtistId: Long,
val favoriteArtistId: Long?,
)
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ data class ProfileResponseDto(
@SerialName("hasFavoriteArtist")
val hasFavoriteArtist: Boolean,
@SerialName("recruitSummary")
val recruitSummary: RecruitSummaryDto,
val recruitSummary: ProfileSummaryDto,
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class ParticipationSummaryDto(
@SerialName("total")
val total: Int,
@SerialName("inProgress")
val inProgress: Int,
@SerialName("completed")
val completed: Int,
)

@Serializable
data class RecruitSummaryDto(
data class ProfileSummaryDto(
@SerialName("total")
val total: Int,
@SerialName("inProgress")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.poti.android.core.network.util.HttpResponseHandler
import com.poti.android.data.mapper.home.toDomain
import com.poti.android.data.remote.datasource.HomeRemoteDataSource
import com.poti.android.domain.model.home.HomeContent
import com.poti.android.domain.model.party.GoodsCategory
import com.poti.android.domain.model.party.ProductCategory
import com.poti.android.domain.repository.HomeRepository
import javax.inject.Inject

Expand All @@ -25,7 +25,7 @@ class HomeRepositoryImpl @Inject constructor(
size: Int?,
sort: String?,
artistId: Long?,
): Result<GoodsCategory> = httpResponseHandler.safeApiCall {
): Result<ProductCategory> = httpResponseHandler.safeApiCall {
homeRemoteDataSource.getGoodsCategoryList(
page = page,
size = size,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package com.poti.android.data.repository

import com.poti.android.core.network.model.handleApiResponse
import com.poti.android.core.network.util.HttpResponseHandler
import com.poti.android.data.mapper.artist.toDomain
import com.poti.android.data.mapper.toDomain
import com.poti.android.data.mapper.user.toDomain
import com.poti.android.data.remote.datasource.UserRemoteDataSource
import com.poti.android.data.remote.dto.request.user.NicknameDuplicateRequestDto
Expand All @@ -19,13 +17,15 @@ class UserRepositoryImpl @Inject constructor(
) : UserRepository {
override suspend fun patchOnboarding(
nickname: String,
favoriteArtistId: Long,
favoriteArtistId: Long?,
): Result<Unit> = httpResponseHandler.safeApiCall {
val requestDto = OnboardingRequestDto(
nickname = nickname,
favoriteArtistId = favoriteArtistId,
)
userRemoteDataSource.patchOnboarding(onboardingRequest = requestDto)
.handleApiResponse()
.getOrThrow()
}

override suspend fun postNicknameDuplicate(nickname: String): Result<Boolean> =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.poti.android.domain.model.home

data class HomeContent(
val nickname: String = "",
val mainArtist: String = "",
val mainArtistId: Long = 0L,
val myGroupItems: List<GroupItem> = emptyList(),
val otherGroupItems: List<GroupItem> = emptyList(),
val banners: List<Banner> = emptyList(),
val nickname: String,
val mainArtist: String?,
val mainArtistId: Long?,
val myGroupItems: List<GroupItem>,
val otherGroupItems: List<GroupItem>,
val banners: List<Banner>,
)

data class GroupItem(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.poti.android.domain.model.party

data class GoodsCategory(
data class ProductCategory(
val nickname: String,
val mainArtist: String?,
val mainArtistId: Long?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data class ProductPartyList(
data class PartySummary(
val partyId: Long,
val price: Int,
val goodsImageUrl: String,
val productImageUrl: String,
val currentCount: Int,
val totalCount: Int,
val availableMembers: List<String>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.poti.android.domain.repository

import com.poti.android.domain.model.home.HomeContent
import com.poti.android.domain.model.party.GoodsCategory
import com.poti.android.domain.model.party.ProductCategory

interface HomeRepository {
suspend fun getHomeContent(): Result<HomeContent>
Expand All @@ -11,5 +11,5 @@ interface HomeRepository {
size: Int? = null,
sort: String? = null,
artistId: Long? = null,
): Result<GoodsCategory>
): Result<ProductCategory>
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.poti.android.domain.model.user.UserProfile
interface UserRepository {
suspend fun patchOnboarding(
nickname: String,
favoriteArtistId: Long,
favoriteArtistId: Long?,
): Result<Unit>

suspend fun postNicknameDuplicate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.foundation.gestures.detectHorizontalDragGestures
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
Expand All @@ -18,6 +19,8 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.compose.LifecycleEventEffect
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.poti.android.core.common.state.ApiState
import com.poti.android.core.common.util.HandleSideEffects
Expand Down Expand Up @@ -49,6 +52,10 @@ fun HistoryListRoute(
) {
val uiState by viewModel.uiState.collectAsStateWithLifecycle()

LifecycleEventEffect(Lifecycle.Event.ON_RESUME) {
viewModel.processIntent(HistoryListUiIntent.OnResume)
}

HandleSideEffects(viewModel.sideEffect) { effect ->
when (effect) {
HistoryListUiEffect.NavigateBack -> onPopBackStack()
Expand Down Expand Up @@ -82,6 +89,7 @@ private fun HistoryListScreen(
) {
Scaffold(
modifier = modifier,
contentWindowInsets = WindowInsets(),
topBar = {
PotiHeaderPage(
onNavigationClick = onBackClick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.poti.android.domain.repository.ParticipationRepository
import com.poti.android.domain.repository.PartyRepository
import com.poti.android.domain.type.HistoryListType
import com.poti.android.presentation.history.list.model.HistoryListUiEffect
import com.poti.android.presentation.history.list.model.HistoryListUiEffect.*
import com.poti.android.presentation.history.list.model.HistoryListUiIntent
import com.poti.android.presentation.history.list.model.HistoryListUiState
import com.poti.android.presentation.history.list.model.HistoryMode
Expand Down Expand Up @@ -41,11 +42,12 @@ class HistoryListViewModel @Inject constructor(
is HistoryListUiIntent.OnTabSelected -> selectTab(intent.tab)
is HistoryListUiIntent.OnCardClick -> {
if (uiState.value.mode == HistoryMode.RECRUIT) {
sendEffect(HistoryListUiEffect.NavigateToRecruiterDetail(intent.id))
sendEffect(NavigateToRecruiterDetail(intent.id))
} else {
sendEffect(HistoryListUiEffect.NavigateToParticipantDetail(intent.id))
sendEffect(NavigateToParticipantDetail(intent.id))
}
}
HistoryListUiIntent.OnResume -> loadUserHistoryList()
}
}

Expand Down Expand Up @@ -117,7 +119,7 @@ class HistoryListViewModel @Inject constructor(
historyListType = listStatus,
partyStatus = item.postStatus,
)
},
}.distinctBy { it.id },
)

updateState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.poti.android.domain.model.history.HistoryListContent

data class HistoryListUiState(
val historyListLoadState: ApiState<HistoryListContent> = ApiState.Init,
val mode: HistoryMode = HistoryMode.RECRUIT,
val mode: HistoryMode = HistoryMode.PARTICIPATION,
val selectedTab: PotiHeaderTabType = PotiHeaderTabType.ONGOING,
) : UiState {
val titleRes = when (mode) {
Expand Down Expand Up @@ -52,6 +52,8 @@ sealed interface HistoryListUiIntent : UiIntent {
data class OnTabSelected(val tab: PotiHeaderTabType) : HistoryListUiIntent

data class OnCardClick(val id: Long) : HistoryListUiIntent

data object OnResume : HistoryListUiIntent
}

sealed interface HistoryListUiEffect : UiEffect {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.compose.LifecycleEventEffect
Comment on lines +15 to +16
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Potential issue | ๐ŸŸก Minor

๐Ÿงฉ Analysis chain

๐Ÿ Script executed:

find . -name "ParticipantManageScreen.kt" -type f

Repository: team-poti/POTI-ANDROID

Length of output: 157


๐Ÿ Script executed:

cat -n app/src/main/java/com/poti/android/presentation/history/manage/ParticipantManageScreen.kt | head -60

Repository: team-poti/POTI-ANDROID

Length of output: 3489


๐ŸŒ Web query:

androidx.lifecycle.compose LifecycleEventEffect ON_RESUME first composition behavior documentation

๐Ÿ’ก Result:

LifecycleEventEffect(Lifecycle.Event.ON_RESUME) does not โ€œfire on first compositionโ€ just because the owner is already in RESUMED.

Per the docs, when LifecycleEventEffect enters the composition it installs a LifecycleEventObserver, and your onEvent runs only when the lifecycle subsequently receives that specific Lifecycle.Event (i.e., itโ€™s event-driven, not โ€œreplay current stateโ€). [1]

So, if the composable is first composed while the LifecycleOwner is already resumed, the ON_RESUME callback typically wonโ€™t run until the next actual resume transition (after a pause/stop, etc.).

If you need โ€œrun immediately if already resumed, and also on future resumesโ€, base it on lifecycle state (e.g., currentStateAsState() / currentStateFlow) rather than only events. [1]

Sources: Android โ€œIntegrate Lifecycle with Composeโ€ (Lifecycle effects + currentStateAsState) [1]; Android โ€œSide-effects in Composeโ€ (registering a LifecycleEventObserver via DisposableEffect, which similarly only reacts to events as they occur) [2].


์ดˆ๊ธฐ ์ง„์ž… ์‹œ ON_RESUME ์ด๋ฒคํŠธ ๋ฐœ์ƒ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

LifecycleEventEffect(Lifecycle.Event.ON_RESUME)๋Š” ์ด๋ฒคํŠธ ๊ธฐ๋ฐ˜์œผ๋กœ ๋™์ž‘ํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ์ปดํฌ์ €๋ธ”์ด ์ด๋ฏธ RESUMED ์ƒํƒœ์ธ ๋ผ์ดํ”„์‚ฌ์ดํด์—์„œ ์ฒ˜์Œ ๊ตฌ์„ฑ๋  ๋•Œ๋Š” ์ฝœ๋ฐฑ์ด ์‹คํ–‰๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ resume ์ „ํ™˜(pause/stop ํ›„ ์žฌ๊ฐœ)์ด ๋ฐœ์ƒํ•  ๋•Œ๋งŒ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

๋”ฐ๋ผ์„œ ์ด ํ™”๋ฉด์— ์ตœ์ดˆ ์ง„์ž…ํ–ˆ์„ ๋•Œ ๋ฐ์ดํ„ฐ ๋กœ๋”ฉ์ด ํ•„์š”ํ•˜๋‹ค๋ฉด:

  • ViewModel์˜ init ๋ธ”๋ก์ด๋‚˜ ๋‹ค๋ฅธ ๋ฉ”์ปค๋‹ˆ์ฆ˜์—์„œ ์ดˆ๊ธฐ ๋กœ๋“œ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š”์ง€ ํ™•์ธํ•˜๊ฑฐ๋‚˜
  • Lifecycle.State.RESUMED ์ƒํƒœ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ฐ์ง€ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๋ฆฌํŒฉํ„ฐ๋ง์„ ๊ณ ๋ คํ•ด ์ฃผ์„ธ์š”.

ํ•„์š”์‹œ currentStateAsState()๋ฅผ ํ™œ์šฉํ•ด ๋ผ์ดํ”„์‚ฌ์ดํด ์ƒํƒœ๋ฅผ ๊ตฌ๋…ํ•˜๋Š” ๋ฐฉ์‹๋„ ๊ณ ๋ คํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿค– Prompt for AI Agents
In
`@app/src/main/java/com/poti/android/presentation/history/manage/ParticipantManageScreen.kt`
around lines 15 - 16, ํ˜„์žฌ ์‚ฌ์šฉ ์ค‘์ธ LifecycleEventEffect(Lifecycle.Event.ON_RESUME)์€
์ปดํฌ์ €๋ธ”์ด ์ด๋ฏธ RESUMED ์ƒํƒœ์ผ ๋•Œ ์ตœ์ดˆ ์ง„์ž… ์‹œ ์ฝœ๋ฐฑ์ด ์‹คํ–‰๋˜์ง€ ์•Š์œผ๋‹ˆ ์ดˆ๊ธฐ ๋ฐ์ดํ„ฐ ๋กœ๋“œ๋ฅผ ๋ณด์žฅํ•˜๋ ค๋ฉด
LifecycleEventEffect(Lifecycle.Event.ON_RESUME)๋งŒ ์˜์กดํ•˜์ง€ ๋ง๊ณ  ViewModel์˜ init ๋ธ”๋ก์—์„œ ์ดˆ๊ธฐ
๋กœ๋“œ๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ฑฐ๋‚˜, ๋ผ์ดํ”„์‚ฌ์ดํด ์ƒํƒœ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ฐ์ง€ํ•˜๋„๋ก ๋ฆฌํŒฉํ„ฐ๋ง(์˜ˆ: Lifecycle.currentStateAsState()๋ฅผ ๊ตฌ๋…ํ•ด
Lifecycle.State.RESUMED ์ง„์ž…์„ ๊ฐ์ง€)ํ•˜์—ฌ ParticipantManageScreen์˜ ์ดˆ๊ธฐ ์ง„์ž… ์‹œ์—๋„ ๋ฐ์ดํ„ฐ๊ฐ€ ๋กœ๋“œ๋˜๋„๋ก
์ˆ˜์ •ํ•˜์„ธ์š”.

import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.poti.android.R
import com.poti.android.core.common.extension.onSuccess
Expand Down Expand Up @@ -39,6 +41,10 @@ fun ParticipantManageRoute(
) {
val uiState by viewModel.uiState.collectAsStateWithLifecycle()

LifecycleEventEffect(Lifecycle.Event.ON_RESUME) {
viewModel.processIntent(ParticipantManageUiIntent.OnResume)
}

HandleSideEffects(viewModel.sideEffect) { effect ->
when (effect) {
ParticipantManageUiEffect.NavigateBack -> popBackStack()
Expand Down
Loading