From 24766b07b3051290837cc8223387fb545c99bf24 Mon Sep 17 00:00:00 2001 From: taehwan Date: Mon, 10 Jun 2024 12:22:45 +0900 Subject: [PATCH] =?UTF-8?q?[#333]=20=EB=A1=9C=EA=B7=B8=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/feature/contributor/ContributorViewModel.kt | 2 -- .../feature/contributor/model/convert/ContributorsConvert.kt | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/feature/contributor/src/main/java/com/droidknights/app/feature/contributor/ContributorViewModel.kt b/feature/contributor/src/main/java/com/droidknights/app/feature/contributor/ContributorViewModel.kt index 31bed3ec..246020a6 100644 --- a/feature/contributor/src/main/java/com/droidknights/app/feature/contributor/ContributorViewModel.kt +++ b/feature/contributor/src/main/java/com/droidknights/app/feature/contributor/ContributorViewModel.kt @@ -1,6 +1,5 @@ package com.droidknights.app.feature.contributor -import android.util.Log import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.droidknights.app.core.domain.usecase.GetContributorsUseCase @@ -27,7 +26,6 @@ class ContributorViewModel @Inject constructor( val uiState: StateFlow = getContributorsUseCase() .map { - Log.i("TEMP", "map? ${it}") it.toContributorsUiState() } .catch { throwable -> diff --git a/feature/contributor/src/main/java/com/droidknights/app/feature/contributor/model/convert/ContributorsConvert.kt b/feature/contributor/src/main/java/com/droidknights/app/feature/contributor/model/convert/ContributorsConvert.kt index 3e33a610..967a2784 100644 --- a/feature/contributor/src/main/java/com/droidknights/app/feature/contributor/model/convert/ContributorsConvert.kt +++ b/feature/contributor/src/main/java/com/droidknights/app/feature/contributor/model/convert/ContributorsConvert.kt @@ -6,6 +6,8 @@ import kotlinx.collections.immutable.toPersistentList internal fun Map>.toContributorsUiState(): ContributorsUiState { val newList = mutableListOf() + + // key, value 추가 forEach { (key, values) -> newList.add( ContributorsUiState.Contributors.Item.Section( @@ -23,6 +25,7 @@ internal fun Map>.toContributorsUiState(): ContributorsUi ) } } + return ContributorsUiState.Contributors( contributors = newList.toPersistentList(), )