본인이 만든 라이브의 경우 팔로잉 버튼, 선물하기 버튼이 보이지 않도록 수정

This commit is contained in:
klaus 2023-08-18 20:56:26 +09:00
parent 2e48dad913
commit a4cdbebeb4
1 changed files with 26 additions and 14 deletions

View File

@ -564,6 +564,13 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
placeholder(R.drawable.ic_place_holder) placeholder(R.drawable.ic_place_holder)
} }
binding.flDonation.visibility =
if (response.creatorId != SharedPreferenceManager.userId) {
View.VISIBLE
} else {
View.GONE
}
if ( if (
response.creatorId == SharedPreferenceManager.userId && response.creatorId == SharedPreferenceManager.userId &&
SharedPreferenceManager.role == MemberRole.CREATOR.name SharedPreferenceManager.role == MemberRole.CREATOR.name
@ -681,6 +688,8 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
} }
} }
if (response.creatorId != SharedPreferenceManager.userId) {
binding.ivCreatorFollow.visibility = View.VISIBLE
if (response.isFollowing) { if (response.isFollowing) {
binding.ivCreatorFollow.setImageResource(R.drawable.btn_following) binding.ivCreatorFollow.setImageResource(R.drawable.btn_following)
binding.ivCreatorFollow.setOnClickListener { binding.ivCreatorFollow.setOnClickListener {
@ -698,6 +707,9 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
) )
} }
} }
} else {
binding.ivCreatorFollow.visibility = View.GONE
}
if (agora.rtmChannelIsNull()) { if (agora.rtmChannelIsNull()) {
joinChannel(response) joinChannel(response)