fix(home): 홈 추천 후속 검증을 반영한다

This commit is contained in:
2026-07-31 16:29:06 +09:00
parent a106548f87
commit d592038edd
28 changed files with 1986 additions and 33 deletions
@@ -20,6 +20,7 @@ import kr.co.vividnext.sodalive.v2.access.AccessRequirement
import kr.co.vividnext.sodalive.v2.access.ensureV2Access
import kr.co.vividnext.sodalive.v2.chat.action.ChatActionCommand
import kr.co.vividnext.sodalive.v2.chat.action.handleChatAction
import kr.co.vividnext.sodalive.v2.components.modal.V2ModalDialog
import kr.co.vividnext.sodalive.v2.common.CreatorActivityType
import kr.co.vividnext.sodalive.v2.community.action.CommunityActionCommand
import kr.co.vividnext.sodalive.v2.community.action.handleCommunityAction
@@ -232,10 +233,26 @@ class HomeMainFragment : BaseFragment<FragmentV2MainHomeBinding>(
adapter = popularCommunityAdapter
}
onCheerFollowAllClick = { creatorIds ->
homeRecommendationViewModel.followCreators(SECTION_KEY_CHEER_CREATORS, creatorIds)
ensureV2Access(AccessRequirement.Login) {
showCheerCreatorsFollowAllConfirmDialog(creatorIds)
}
}
}
private fun showCheerCreatorsFollowAllConfirmDialog(creatorIds: List<Long>) {
V2ModalDialog(
activity = requireActivity(),
layoutInflater = layoutInflater,
title = getString(R.string.home_recommendation_follow_all_confirm_title),
desc = getString(R.string.home_recommendation_follow_all_confirm_description),
confirmButtonTitle = getString(R.string.home_recommendation_follow_all_confirm_button),
confirmButtonClick = {
homeRecommendationViewModel.followCreators(SECTION_KEY_CHEER_CREATORS, creatorIds)
},
cancelButtonTitle = getString(R.string.cancel)
).show(screenWidth)
}
private fun setUpCreatorRankingAdapter() {
binding.rvHomeCreatorRankings.apply {
layoutManager = CreatorRankingAdapter.createGridLayoutManager(requireContext())
@@ -5,7 +5,6 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import coil.dispose
import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.common.image.BlurTransformation
import kr.co.vividnext.sodalive.extensions.loadUrl
import kr.co.vividnext.sodalive.v2.main.home.model.HomeRecommendationPopularCommunityPostSection
import kr.co.vividnext.sodalive.v2.main.home.model.HomeRecommendationPopularCommunityPostUiModel
@@ -51,9 +50,8 @@ class HomePopularCommunityAdapter(
view.setOnFeedClick { feedItem -> onClickItem(feedItem as FeedItem.Community) }
bindImage(item.item.creatorImageUrl, view.profileImageView())
bindImage(
imageUrl = item.item.imageUrl,
imageUrl = item.item.imageUrl.takeIf { !item.item.isLockedPaidPost() },
imageView = view.communityImageView(),
shouldBlur = item.item.price > 0 && !item.item.existOrdered,
onImageLoaded = { width, height -> view.applyCommunityImageSize(width, height) }
)
}
@@ -61,7 +59,6 @@ class HomePopularCommunityAdapter(
private fun bindImage(
imageUrl: String?,
imageView: android.widget.ImageView,
shouldBlur: Boolean = false,
onImageLoaded: ((Int, Int) -> Unit)? = null
) {
if (imageUrl.isNullOrBlank()) {
@@ -74,11 +71,12 @@ class HomePopularCommunityAdapter(
onImageLoaded?.invoke(result.drawable.intrinsicWidth, result.drawable.intrinsicHeight)
}
)
if (shouldBlur) {
transformations(BlurTransformation(imageView.context, 25f, 2.5f))
}
}
}
}
private fun FeedItem.Community.isLockedPaidPost(): Boolean {
return price > 0 && !existOrdered
}
}
}
+3
View File
@@ -323,6 +323,9 @@
<string name="home_recommendation_activity_community">Community</string>
<string name="home_recommendation_follow_all">Follow all</string>
<string name="home_recommendation_follow_all_done">Following all</string>
<string name="home_recommendation_follow_all_confirm_title">Follow all</string>
<string name="home_recommendation_follow_all_confirm_description">Would you like to follow all creators in this list?</string>
<string name="home_recommendation_follow_all_confirm_button">Follow</string>
<string name="home_recommendation_more">More</string>
<string name="home_recommendation_collapse">Collapse</string>
<string name="common_error_unknown">An unknown error occurred. try again.</string>
+3
View File
@@ -323,6 +323,9 @@
<string name="home_recommendation_activity_community">コミュニティ</string>
<string name="home_recommendation_follow_all">すべてフォロー</string>
<string name="home_recommendation_follow_all_done">すべてフォロー中</string>
<string name="home_recommendation_follow_all_confirm_title">すべてフォロー</string>
<string name="home_recommendation_follow_all_confirm_description">このリストのクリエイターをすべてフォローしますか?</string>
<string name="home_recommendation_follow_all_confirm_button">フォローする</string>
<string name="home_recommendation_more">もっと見る</string>
<string name="home_recommendation_collapse">折りたたむ</string>
<string name="common_error_unknown">不明なエラーが発生しました。恐れ入りますが、もう一度お試しください。</string>
+3
View File
@@ -322,6 +322,9 @@
<string name="home_recommendation_activity_community">커뮤니티</string>
<string name="home_recommendation_follow_all">모두 팔로우 하기</string>
<string name="home_recommendation_follow_all_done">모두 팔로우 완료</string>
<string name="home_recommendation_follow_all_confirm_title">모두 팔로우</string>
<string name="home_recommendation_follow_all_confirm_description">목록의 크리에이터를 모두 팔로우하시겠어요?</string>
<string name="home_recommendation_follow_all_confirm_button">팔로우 하기</string>
<string name="home_recommendation_more">더보기</string>
<string name="home_recommendation_collapse">접기</string>
<string name="common_error_unknown">알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.</string>