feat(profile): 채널 후원 비밀문구와 내 페이지 노출 조건을 정리한다

This commit is contained in:
2026-02-26 00:42:02 +09:00
parent de4b301ccb
commit 96108aa520
7 changed files with 35 additions and 2 deletions

View File

@@ -347,6 +347,9 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
}
private fun setupChannelDonationView() {
binding.layoutUserProfileChannelDonation.llChannelDonation.visibility =
if (userId == SharedPreferenceManager.userId) View.GONE else View.VISIBLE
binding.layoutUserProfileChannelDonation.tvAll.setOnClickListener {
val intent = Intent(applicationContext, UserProfileChannelDonationAllViewActivity::class.java)
intent.putExtra(Constants.EXTRA_USER_ID, userId)
@@ -358,7 +361,9 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
this,
LayoutInflater.from(this),
isLiveDonation = true,
messageMaxLength = 100
messageMaxLength = 100,
secretToggleLabelResId = R.string.screen_user_profile_channel_donation_secret,
applySecretMissionMessageHint = false
) { can, message, isSecret ->
viewModel.postChannelDonation(
creatorId = userId,

View File

@@ -28,6 +28,8 @@ class LiveRoomDonationDialog(
layoutInflater: LayoutInflater,
isLiveDonation: Boolean = false,
messageMaxLength: Int = 1000,
secretToggleLabelResId: Int = R.string.screen_live_room_secret_mission,
applySecretMissionMessageHint: Boolean = true,
onClickDonation: (Int, String, Boolean) -> Unit
) {
@@ -103,10 +105,11 @@ class LiveRoomDonationDialog(
if (isLiveDonation) {
dialogView.rlSecret.visibility = View.VISIBLE
dialogView.tvSecret.text = activity.getString(secretToggleLabelResId)
dialogView.tvSecret.setOnClickListener {
val isSelected = dialogView.tvSecret.isSelected
dialogView.tvSecret.isSelected = !isSelected
dialogView.etDonationMessage.hint = if (!isSelected) {
dialogView.etDonationMessage.hint = if (!isSelected && applySecretMissionMessageHint) {
activity.getString(
R.string.screen_live_room_secret_mission_hint_format,
messageMaxLength