크리에이터 채널 - 함께 들으면 좋은 채널 제거
This commit is contained in:
parent
72d16c4d18
commit
479f956db3
|
@ -7,8 +7,6 @@ data class GetCreatorProfileResponse(
|
||||||
val creator: CreatorResponse,
|
val creator: CreatorResponse,
|
||||||
@SerializedName("userDonationRanking")
|
@SerializedName("userDonationRanking")
|
||||||
val userDonationRanking: List<UserDonationRankingResponse>,
|
val userDonationRanking: List<UserDonationRankingResponse>,
|
||||||
@SerializedName("similarCreatorList")
|
|
||||||
val similarCreatorList: List<SimilarCreatorResponse>,
|
|
||||||
@SerializedName("liveRoomList")
|
@SerializedName("liveRoomList")
|
||||||
val liveRoomList: List<LiveRoomResponse>,
|
val liveRoomList: List<LiveRoomResponse>,
|
||||||
@SerializedName("contentList")
|
@SerializedName("contentList")
|
||||||
|
@ -45,13 +43,6 @@ data class UserDonationRankingResponse(
|
||||||
@SerializedName("donationCan") val donationCan: Int
|
@SerializedName("donationCan") val donationCan: Int
|
||||||
)
|
)
|
||||||
|
|
||||||
data class SimilarCreatorResponse(
|
|
||||||
@SerializedName("userId") val userId: Long,
|
|
||||||
@SerializedName("nickname") val nickname: String,
|
|
||||||
@SerializedName("profileImage") val profileImage: String,
|
|
||||||
@SerializedName("tags") val tags: List<String>
|
|
||||||
)
|
|
||||||
|
|
||||||
data class LiveRoomResponse(
|
data class LiveRoomResponse(
|
||||||
@SerializedName("roomId") val roomId: Long,
|
@SerializedName("roomId") val roomId: Long,
|
||||||
@SerializedName("title") val title: String,
|
@SerializedName("title") val title: String,
|
||||||
|
|
|
@ -63,7 +63,6 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
|
||||||
private lateinit var liveAdapter: UserProfileLiveAdapter
|
private lateinit var liveAdapter: UserProfileLiveAdapter
|
||||||
private lateinit var audioContentAdapter: AudioContentAdapter
|
private lateinit var audioContentAdapter: AudioContentAdapter
|
||||||
private lateinit var donationAdapter: UserProfileDonationAdapter
|
private lateinit var donationAdapter: UserProfileDonationAdapter
|
||||||
private lateinit var similarCreatorAdapter: UserProfileSimilarCreatorAdapter
|
|
||||||
private lateinit var cheersAdapter: UserProfileCheersAdapter
|
private lateinit var cheersAdapter: UserProfileCheersAdapter
|
||||||
|
|
||||||
private lateinit var noticeWriteLauncher: ActivityResultLauncher<Intent>
|
private lateinit var noticeWriteLauncher: ActivityResultLauncher<Intent>
|
||||||
|
@ -122,7 +121,6 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
|
||||||
|
|
||||||
setupLiveView()
|
setupLiveView()
|
||||||
setupDonationView()
|
setupDonationView()
|
||||||
setupSimilarCreatorView()
|
|
||||||
setupFanTalkView()
|
setupFanTalkView()
|
||||||
setupAudioContentListView()
|
setupAudioContentListView()
|
||||||
}
|
}
|
||||||
|
@ -310,51 +308,6 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
|
||||||
recyclerView.adapter = donationAdapter
|
recyclerView.adapter = donationAdapter
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupSimilarCreatorView() {
|
|
||||||
val recyclerView = binding.layoutUserProfileSimilarCreator.rvSimilarCreator
|
|
||||||
similarCreatorAdapter = UserProfileSimilarCreatorAdapter {
|
|
||||||
val intent = Intent(applicationContext, UserProfileActivity::class.java)
|
|
||||||
intent.putExtra(Constants.EXTRA_USER_ID, it.userId)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
|
|
||||||
recyclerView.layoutManager = LinearLayoutManager(
|
|
||||||
applicationContext,
|
|
||||||
LinearLayoutManager.VERTICAL,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
|
|
||||||
recyclerView.addItemDecoration(object : RecyclerView.ItemDecoration() {
|
|
||||||
override fun getItemOffsets(
|
|
||||||
outRect: Rect,
|
|
||||||
view: View,
|
|
||||||
parent: RecyclerView,
|
|
||||||
state: RecyclerView.State
|
|
||||||
) {
|
|
||||||
super.getItemOffsets(outRect, view, parent, state)
|
|
||||||
|
|
||||||
when (parent.getChildAdapterPosition(view)) {
|
|
||||||
0 -> {
|
|
||||||
outRect.top = 0
|
|
||||||
outRect.bottom = 10f.dpToPx().toInt()
|
|
||||||
}
|
|
||||||
|
|
||||||
similarCreatorAdapter.itemCount - 1 -> {
|
|
||||||
outRect.top = 10f.dpToPx().toInt()
|
|
||||||
outRect.bottom = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> {
|
|
||||||
outRect.top = 10f.dpToPx().toInt()
|
|
||||||
outRect.bottom = 10f.dpToPx().toInt()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
recyclerView.adapter = similarCreatorAdapter
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setupFanTalkView() {
|
private fun setupFanTalkView() {
|
||||||
binding.layoutUserProfileFanTalk.tvAll.setOnClickListener {
|
binding.layoutUserProfileFanTalk.tvAll.setOnClickListener {
|
||||||
val intent = Intent(
|
val intent = Intent(
|
||||||
|
@ -559,7 +512,6 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
|
||||||
setCreatorNotice(it.notice, it.creator.creatorId)
|
setCreatorNotice(it.notice, it.creator.creatorId)
|
||||||
setAudioContentList(it.contentList)
|
setAudioContentList(it.contentList)
|
||||||
setLiveRoomList(it.liveRoomList)
|
setLiveRoomList(it.liveRoomList)
|
||||||
setSimilarCreatorList(it.similarCreatorList)
|
|
||||||
setUserDonationRanking(it.userDonationRanking)
|
setUserDonationRanking(it.userDonationRanking)
|
||||||
setActivitySummary(it.activitySummary)
|
setActivitySummary(it.activitySummary)
|
||||||
}
|
}
|
||||||
|
@ -748,18 +700,6 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
|
||||||
private fun setSimilarCreatorList(similarCreatorList: List<SimilarCreatorResponse>) {
|
|
||||||
if (similarCreatorList.isEmpty()) {
|
|
||||||
binding.llUserProfileSimilarCreator.visibility = View.GONE
|
|
||||||
} else {
|
|
||||||
binding.llUserProfileSimilarCreator.visibility = View.VISIBLE
|
|
||||||
similarCreatorAdapter.items.clear()
|
|
||||||
similarCreatorAdapter.items.addAll(similarCreatorList)
|
|
||||||
similarCreatorAdapter.notifyDataSetChanged()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
private fun setUserDonationRanking(userDonationRanking: List<UserDonationRankingResponse>) {
|
private fun setUserDonationRanking(userDonationRanking: List<UserDonationRankingResponse>) {
|
||||||
if (userDonationRanking.isEmpty()) {
|
if (userDonationRanking.isEmpty()) {
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
package kr.co.vividnext.sodalive.explorer.profile
|
|
||||||
|
|
||||||
import android.view.LayoutInflater
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
|
||||||
import coil.load
|
|
||||||
import coil.transform.CircleCropTransformation
|
|
||||||
import kr.co.vividnext.sodalive.R
|
|
||||||
import kr.co.vividnext.sodalive.databinding.ItemUserProfileSimilarCreatorBinding
|
|
||||||
|
|
||||||
class UserProfileSimilarCreatorAdapter(
|
|
||||||
private val onClickItem: (SimilarCreatorResponse) -> Unit
|
|
||||||
) : RecyclerView.Adapter<UserProfileSimilarCreatorAdapter.ViewHolder>() {
|
|
||||||
|
|
||||||
val items = mutableListOf<SimilarCreatorResponse>()
|
|
||||||
|
|
||||||
inner class ViewHolder(
|
|
||||||
private val binding: ItemUserProfileSimilarCreatorBinding
|
|
||||||
) : RecyclerView.ViewHolder(binding.root) {
|
|
||||||
fun bind(item: SimilarCreatorResponse) {
|
|
||||||
binding.ivProfile.load(item.profileImage) {
|
|
||||||
crossfade(true)
|
|
||||||
placeholder(R.drawable.ic_place_holder)
|
|
||||||
transformations(CircleCropTransformation())
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.tvNickname.text = item.nickname
|
|
||||||
binding.tvTags.text = item.tags.joinToString(" ") { "#$it" }
|
|
||||||
binding.root.setOnClickListener { onClickItem(item) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ViewHolder(
|
|
||||||
ItemUserProfileSimilarCreatorBinding.inflate(
|
|
||||||
LayoutInflater.from(parent.context),
|
|
||||||
parent,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
|
||||||
holder.bind(items[position])
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getItemCount() = items.count()
|
|
||||||
}
|
|
|
@ -290,26 +290,6 @@
|
||||||
android:background="@color/color_232323" />
|
android:background="@color/color_232323" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/ll_user_profile_similar_creator"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/layout_user_profile_similar_creator"
|
|
||||||
layout="@layout/layout_user_profile_similar_creator"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="13.3dp" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="6.7dp"
|
|
||||||
android:layout_marginVertical="26.7dp"
|
|
||||||
android:background="@color/color_232323" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/layout_user_profile_fan_talk"
|
android:id="@+id/layout_user_profile_fan_talk"
|
||||||
layout="@layout/layout_user_profile_fan_talk"
|
layout="@layout/layout_user_profile_fan_talk"
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_title"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="@font/gmarket_sans_bold"
|
|
||||||
android:text="함께 들으면 좋은 채널"
|
|
||||||
android:textColor="@color/color_eeeeee"
|
|
||||||
android:textSize="16.7sp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="@font/gmarket_sans_light"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="전체보기"
|
|
||||||
android:textColor="@color/color_bbbbbb"
|
|
||||||
android:textSize="11.3sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/tv_title" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/rv_similar_creator"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="26.7dp"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
Loading…
Reference in New Issue