fix(home): FIRST 오디오 응답 매핑을 제거한다
This commit is contained in:
@@ -10,7 +10,6 @@ data class HomeRecommendationResponse(
|
|||||||
@SerializedName("banners") val banners: List<HomeBannerItem>,
|
@SerializedName("banners") val banners: List<HomeBannerItem>,
|
||||||
@SerializedName("recentlyActiveCreators") val recentlyActiveCreators: List<HomeActiveCreatorItem>,
|
@SerializedName("recentlyActiveCreators") val recentlyActiveCreators: List<HomeActiveCreatorItem>,
|
||||||
@SerializedName("recentDebutCreators") val recentDebutCreators: List<HomeCreatorItem>,
|
@SerializedName("recentDebutCreators") val recentDebutCreators: List<HomeCreatorItem>,
|
||||||
@SerializedName("firstAudioContents") val firstAudioContents: List<HomeFirstAudioContentItem>,
|
|
||||||
@SerializedName("aiCharacters") val aiCharacters: List<HomeAiCharacterItem>,
|
@SerializedName("aiCharacters") val aiCharacters: List<HomeAiCharacterItem>,
|
||||||
@SerializedName("genreCreators") val genreCreators: List<HomeGenreCreatorGroupItem>,
|
@SerializedName("genreCreators") val genreCreators: List<HomeGenreCreatorGroupItem>,
|
||||||
@SerializedName("cheerCreators") val cheerCreators: List<HomeCreatorItem>,
|
@SerializedName("cheerCreators") val cheerCreators: List<HomeCreatorItem>,
|
||||||
@@ -49,18 +48,6 @@ data class HomeCreatorItem(
|
|||||||
@SerializedName("creatorProfileImage") val creatorProfileImage: String
|
@SerializedName("creatorProfileImage") val creatorProfileImage: String
|
||||||
)
|
)
|
||||||
|
|
||||||
@Keep
|
|
||||||
data class HomeFirstAudioContentItem(
|
|
||||||
@SerializedName("contentId") val contentId: Long,
|
|
||||||
@SerializedName("creatorId") val creatorId: Long,
|
|
||||||
@SerializedName("creatorNickname") val creatorNickname: String,
|
|
||||||
@SerializedName("creatorProfileImage") val creatorProfileImage: String,
|
|
||||||
@SerializedName("title") val title: String,
|
|
||||||
@SerializedName("price") val price: Int,
|
|
||||||
@SerializedName("coverImage") val coverImage: String?,
|
|
||||||
@SerializedName("isPointAvailable") val isPointAvailable: Boolean
|
|
||||||
)
|
|
||||||
|
|
||||||
@Keep
|
@Keep
|
||||||
data class HomeAiCharacterItem(
|
data class HomeAiCharacterItem(
|
||||||
@SerializedName("characterId") val characterId: Long,
|
@SerializedName("characterId") val characterId: Long,
|
||||||
|
|||||||
@@ -6,12 +6,10 @@ import kr.co.vividnext.sodalive.v2.main.home.data.HomeActiveCreatorItem
|
|||||||
import kr.co.vividnext.sodalive.v2.main.home.data.HomeAiCharacterItem
|
import kr.co.vividnext.sodalive.v2.main.home.data.HomeAiCharacterItem
|
||||||
import kr.co.vividnext.sodalive.v2.main.home.data.HomeBannerItem
|
import kr.co.vividnext.sodalive.v2.main.home.data.HomeBannerItem
|
||||||
import kr.co.vividnext.sodalive.v2.main.home.data.HomeCreatorItem
|
import kr.co.vividnext.sodalive.v2.main.home.data.HomeCreatorItem
|
||||||
import kr.co.vividnext.sodalive.v2.main.home.data.HomeFirstAudioContentItem
|
|
||||||
import kr.co.vividnext.sodalive.v2.main.home.data.HomeGenreCreatorGroupItem
|
import kr.co.vividnext.sodalive.v2.main.home.data.HomeGenreCreatorGroupItem
|
||||||
import kr.co.vividnext.sodalive.v2.main.home.data.HomeLiveItem
|
import kr.co.vividnext.sodalive.v2.main.home.data.HomeLiveItem
|
||||||
import kr.co.vividnext.sodalive.v2.main.home.data.HomePopularCommunityPostItem
|
import kr.co.vividnext.sodalive.v2.main.home.data.HomePopularCommunityPostItem
|
||||||
import kr.co.vividnext.sodalive.v2.main.home.data.HomeRecommendationResponse
|
import kr.co.vividnext.sodalive.v2.main.home.data.HomeRecommendationResponse
|
||||||
import kr.co.vividnext.sodalive.v2.widget.AudioContentTag
|
|
||||||
import kr.co.vividnext.sodalive.v2.widget.characterchatthumbnail.CharacterChatThumbnailItem
|
import kr.co.vividnext.sodalive.v2.widget.characterchatthumbnail.CharacterChatThumbnailItem
|
||||||
import kr.co.vividnext.sodalive.v2.widget.feed.FeedItem
|
import kr.co.vividnext.sodalive.v2.widget.feed.FeedItem
|
||||||
|
|
||||||
@@ -23,7 +21,6 @@ fun HomeRecommendationResponse.toContent(): HomeRecommendationUiState.Content =
|
|||||||
banners = HomeRecommendationBannerSection(banners.map { it.toUiModel() }),
|
banners = HomeRecommendationBannerSection(banners.map { it.toUiModel() }),
|
||||||
recentlyActiveCreators = HomeRecommendationRecentlyActiveCreatorSection(recentlyActiveCreators.map { it.toUiModel() }),
|
recentlyActiveCreators = HomeRecommendationRecentlyActiveCreatorSection(recentlyActiveCreators.map { it.toUiModel() }),
|
||||||
recentDebutCreators = HomeRecommendationRecentDebutCreatorSection(recentDebutCreators.map { it.toUiModel() }),
|
recentDebutCreators = HomeRecommendationRecentDebutCreatorSection(recentDebutCreators.map { it.toUiModel() }),
|
||||||
firstAudioContents = HomeRecommendationFirstAudioContentSection(firstAudioContents.map { it.toUiModel() }),
|
|
||||||
aiCharacters = HomeRecommendationAiCharacterSection(aiCharacters.map { it.toUiModel() }),
|
aiCharacters = HomeRecommendationAiCharacterSection(aiCharacters.map { it.toUiModel() }),
|
||||||
genreCreators = HomeRecommendationGenreCreatorSection(genreCreators.map { it.toUiModel() }),
|
genreCreators = HomeRecommendationGenreCreatorSection(genreCreators.map { it.toUiModel() }),
|
||||||
cheerCreators = HomeRecommendationCheerCreatorSection(cheerCreators.map { it.toUiModel() }),
|
cheerCreators = HomeRecommendationCheerCreatorSection(cheerCreators.map { it.toUiModel() }),
|
||||||
@@ -62,22 +59,6 @@ fun HomeCreatorItem.toUiModel(): HomeRecommendationCreatorUiModel = HomeRecommen
|
|||||||
profileImage = creatorProfileImage
|
profileImage = creatorProfileImage
|
||||||
)
|
)
|
||||||
|
|
||||||
fun HomeFirstAudioContentItem.toUiModel(): HomeRecommendationFirstAudioContentUiModel =
|
|
||||||
HomeRecommendationFirstAudioContentUiModel(
|
|
||||||
contentId = contentId,
|
|
||||||
creatorId = creatorId,
|
|
||||||
creatorNickname = creatorNickname,
|
|
||||||
creatorProfileImage = creatorProfileImage,
|
|
||||||
title = title,
|
|
||||||
price = price,
|
|
||||||
coverImage = coverImage,
|
|
||||||
tags = buildSet {
|
|
||||||
add(AudioContentTag.First)
|
|
||||||
if (isPointAvailable) add(AudioContentTag.Point)
|
|
||||||
if (price == 0) add(AudioContentTag.Free)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
fun HomeAiCharacterItem.toUiModel(): HomeRecommendationAiCharacterUiModel = HomeRecommendationAiCharacterUiModel(
|
fun HomeAiCharacterItem.toUiModel(): HomeRecommendationAiCharacterUiModel = HomeRecommendationAiCharacterUiModel(
|
||||||
creatorId = creatorId,
|
creatorId = creatorId,
|
||||||
item = CharacterChatThumbnailItem(
|
item = CharacterChatThumbnailItem(
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import kr.co.vividnext.sodalive.settings.event.EventDetailActivity
|
|||||||
import kr.co.vividnext.sodalive.settings.event.EventItem
|
import kr.co.vividnext.sodalive.settings.event.EventItem
|
||||||
import kr.co.vividnext.sodalive.v2.common.CreatorActivityType
|
import kr.co.vividnext.sodalive.v2.common.CreatorActivityType
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.CreatorChannelActivity
|
import kr.co.vividnext.sodalive.v2.creator.channel.CreatorChannelActivity
|
||||||
import kr.co.vividnext.sodalive.v2.widget.AudioContentTag
|
|
||||||
import kr.co.vividnext.sodalive.v2.widget.characterchatthumbnail.CharacterChatThumbnailItem
|
import kr.co.vividnext.sodalive.v2.widget.characterchatthumbnail.CharacterChatThumbnailItem
|
||||||
import kr.co.vividnext.sodalive.v2.widget.feed.FeedItem
|
import kr.co.vividnext.sodalive.v2.widget.feed.FeedItem
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
@@ -33,10 +32,6 @@ data class HomeRecommendationRecentDebutCreatorSection(
|
|||||||
val items: List<HomeRecommendationCreatorUiModel>
|
val items: List<HomeRecommendationCreatorUiModel>
|
||||||
)
|
)
|
||||||
|
|
||||||
data class HomeRecommendationFirstAudioContentSection(
|
|
||||||
val items: List<HomeRecommendationFirstAudioContentUiModel>
|
|
||||||
)
|
|
||||||
|
|
||||||
data class HomeRecommendationAiCharacterSection(
|
data class HomeRecommendationAiCharacterSection(
|
||||||
val items: List<HomeRecommendationAiCharacterUiModel>
|
val items: List<HomeRecommendationAiCharacterUiModel>
|
||||||
)
|
)
|
||||||
@@ -179,17 +174,6 @@ data class HomeRecommendationCreatorUiModel(
|
|||||||
val profileImage: String
|
val profileImage: String
|
||||||
)
|
)
|
||||||
|
|
||||||
data class HomeRecommendationFirstAudioContentUiModel(
|
|
||||||
val contentId: Long,
|
|
||||||
val creatorId: Long,
|
|
||||||
val creatorNickname: String,
|
|
||||||
val creatorProfileImage: String,
|
|
||||||
val title: String,
|
|
||||||
val price: Int,
|
|
||||||
val coverImage: String?,
|
|
||||||
val tags: Set<AudioContentTag>
|
|
||||||
)
|
|
||||||
|
|
||||||
data class HomeRecommendationAiCharacterUiModel(
|
data class HomeRecommendationAiCharacterUiModel(
|
||||||
val creatorId: Long,
|
val creatorId: Long,
|
||||||
val item: CharacterChatThumbnailItem
|
val item: CharacterChatThumbnailItem
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ sealed interface HomeRecommendationUiState {
|
|||||||
val banners: HomeRecommendationBannerSection,
|
val banners: HomeRecommendationBannerSection,
|
||||||
val recentlyActiveCreators: HomeRecommendationRecentlyActiveCreatorSection,
|
val recentlyActiveCreators: HomeRecommendationRecentlyActiveCreatorSection,
|
||||||
val recentDebutCreators: HomeRecommendationRecentDebutCreatorSection,
|
val recentDebutCreators: HomeRecommendationRecentDebutCreatorSection,
|
||||||
val firstAudioContents: HomeRecommendationFirstAudioContentSection,
|
|
||||||
val aiCharacters: HomeRecommendationAiCharacterSection,
|
val aiCharacters: HomeRecommendationAiCharacterSection,
|
||||||
val genreCreators: HomeRecommendationGenreCreatorSection,
|
val genreCreators: HomeRecommendationGenreCreatorSection,
|
||||||
val cheerCreators: HomeRecommendationCheerCreatorSection,
|
val cheerCreators: HomeRecommendationCheerCreatorSection,
|
||||||
@@ -19,7 +18,6 @@ sealed interface HomeRecommendationUiState {
|
|||||||
banners.items,
|
banners.items,
|
||||||
recentlyActiveCreators.items,
|
recentlyActiveCreators.items,
|
||||||
recentDebutCreators.items,
|
recentDebutCreators.items,
|
||||||
firstAudioContents.items,
|
|
||||||
aiCharacters.items,
|
aiCharacters.items,
|
||||||
genreCreators.groups,
|
genreCreators.groups,
|
||||||
cheerCreators.items,
|
cheerCreators.items,
|
||||||
|
|||||||
Reference in New Issue
Block a user