Skip to content

Commit

Permalink
[Feat] registeredMemes 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ze-zeh committed Sep 28, 2024
1 parent 0f0d812 commit 59679af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions feature/mypage/src/main/java/team/ppac/mypage/MyPageScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ import team.ppac.mypage.component.MyPageProgressBar
import team.ppac.mypage.component.MyPagePullRefreshIndicator
import team.ppac.mypage.component.MyPageSpeechBubble
import team.ppac.mypage.component.RecentMemeContent
import team.ppac.mypage.component.SavedMemeContent
import team.ppac.mypage.component.RegisteredMemeContent
import team.ppac.mypage.component.SavedMemeContent
import team.ppac.mypage.model.LevelUiModel
import team.ppac.mypage.model.MyPageLevel
import team.ppac.mypage.mvi.MyPageIntent
Expand All @@ -64,6 +64,7 @@ internal fun MyPageScreen(
onIntent: (MyPageIntent) -> Unit,
) {
val savedMemes = uiState.savedMemes.collectAsLazyPagingItems()
val registeredMemes = uiState.registeredMemes.collectAsLazyPagingItems()
val pullRefreshState = rememberPullRefreshState(
refreshing = uiState.isRefreshing,
onRefresh = {
Expand Down Expand Up @@ -146,7 +147,7 @@ internal fun MyPageScreen(
when (uiState.currentTabType) {
MyPageTabType.REGISTERED_MEMES -> {
RegisteredMemeContent(
registeredMemes = savedMemes, // TODO(ze-zeh) : API 연결 필요
registeredMemes = registeredMemes,
onMemeClick = { memeId ->
onIntent(MyPageIntent.ClickRegisteredMemeItem(memeId = memeId))
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ data class MyPageUiState(
val currentTabType: MyPageTabType = MyPageTabType.REGISTERED_MEMES,
val recentMemes: ImmutableList<Meme> = persistentListOf(),
val savedMemes: Flow<PagingData<Meme>> = flowOf(PagingData.empty()),
val registeredMemes: Flow<PagingData<Meme>> = flowOf(PagingData.empty()),
) : UiState {
companion object {
val INITIAL_STATE
Expand Down

0 comments on commit 59679af

Please sign in to comment.