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

View File

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

View File

@@ -800,6 +800,7 @@
<string name="screen_user_profile_channel_donation_button">Donate to Channel</string> <string name="screen_user_profile_channel_donation_button">Donate to Channel</string>
<string name="screen_user_profile_channel_donation_all_title">View all Channel Donations</string> <string name="screen_user_profile_channel_donation_all_title">View all Channel Donations</string>
<string name="screen_user_profile_channel_donation_empty">No channel donations yet.</string> <string name="screen_user_profile_channel_donation_empty">No channel donations yet.</string>
<string name="screen_user_profile_channel_donation_secret">Secret donation</string>
<string name="screen_user_profile_cheer_label">Cheer</string> <string name="screen_user_profile_cheer_label">Cheer</string>
<string name="screen_user_profile_cheer_hint">Leave a cheer comment!</string> <string name="screen_user_profile_cheer_hint">Leave a cheer comment!</string>
<string name="screen_user_profile_cheer_reply_hint">Leave a reply to this cheer!</string> <string name="screen_user_profile_cheer_reply_hint">Leave a reply to this cheer!</string>

View File

@@ -800,6 +800,7 @@
<string name="screen_user_profile_channel_donation_button">チャンネルにギフトする</string> <string name="screen_user_profile_channel_donation_button">チャンネルにギフトする</string>
<string name="screen_user_profile_channel_donation_all_title">チャンネルギフトをすべて見る</string> <string name="screen_user_profile_channel_donation_all_title">チャンネルギフトをすべて見る</string>
<string name="screen_user_profile_channel_donation_empty">チャンネルギフトがありません。</string> <string name="screen_user_profile_channel_donation_empty">チャンネルギフトがありません。</string>
<string name="screen_user_profile_channel_donation_secret">シークレットギフト</string>
<string name="screen_user_profile_cheer_label">応援</string> <string name="screen_user_profile_cheer_label">応援</string>
<string name="screen_user_profile_cheer_hint">応援コメントを残してみましょう!</string> <string name="screen_user_profile_cheer_hint">応援コメントを残してみましょう!</string>
<string name="screen_user_profile_cheer_reply_hint">応援コメントに返信してみましょう!</string> <string name="screen_user_profile_cheer_reply_hint">応援コメントに返信してみましょう!</string>

View File

@@ -799,6 +799,7 @@
<string name="screen_user_profile_channel_donation_button">채널 후원하기</string> <string name="screen_user_profile_channel_donation_button">채널 후원하기</string>
<string name="screen_user_profile_channel_donation_all_title">채널 후원 전체보기</string> <string name="screen_user_profile_channel_donation_all_title">채널 후원 전체보기</string>
<string name="screen_user_profile_channel_donation_empty">채널 후원이 없습니다.</string> <string name="screen_user_profile_channel_donation_empty">채널 후원이 없습니다.</string>
<string name="screen_user_profile_channel_donation_secret">비밀후원</string>
<string name="screen_user_profile_cheer_label">응원</string> <string name="screen_user_profile_cheer_label">응원</string>
<string name="screen_user_profile_cheer_hint">응원댓글을 남겨보세요!</string> <string name="screen_user_profile_cheer_hint">응원댓글을 남겨보세요!</string>
<string name="screen_user_profile_cheer_reply_hint">응원댓글에 답글을 남겨보세요!</string> <string name="screen_user_profile_cheer_reply_hint">응원댓글에 답글을 남겨보세요!</string>

View File

@@ -0,0 +1,13 @@
- [x] 후원 UI 공용 다이얼로그와 호출부에서 문구 분기 지점을 확정한다.
- [x] 채널 후원에서는 '비밀후원', 라이브 룸에서는 기존 '비밀미션'이 노출되도록 구현한다.
- [x] 다국어 리소스(values, values-en, values-ja)에 신규 문구를 추가하고 연결한다.
- [x] 관련 검증(진단/테스트)을 수행하고 결과를 기록한다.
- [x] 비밀후원 체크 시 메시지 입력창은 체크 전과 동일한 힌트를 유지하도록 수정하고 검증한다.
## 검증 기록
- 무엇/왜/어떻게: Kotlin LSP 진단 가능 여부를 먼저 확인해 수정 파일 정적 진단을 수행하려고 했다. 명령: `lsp_diagnostics(LiveRoomDonationDialog.kt, UserProfileActivity.kt)` 결과: 현 실행 환경에 `.kt` LSP 서버가 설정되어 있지 않아 도구 기반 LSP 진단은 수행 불가 메시지를 확인했다.
- 무엇/왜/어떻게: 변경으로 인한 회귀를 확인하기 위해 단위 테스트를 전체 실행했다. 명령: `./gradlew :app:testDebugUnitTest` 결과: `BUILD SUCCESSFUL`.
- 무엇/왜/어떻게: 실제 앱 빌드 가능 여부를 검증하기 위해 디버그 APK 빌드를 수행했다. 명령: `./gradlew :app:assembleDebug` 결과: `BUILD SUCCESSFUL`.
- 무엇/왜/어떻게: 최종 상태 재검증을 위해 테스트와 빌드를 한 번 더 동시 실행했다. 명령: `./gradlew :app:testDebugUnitTest :app:assembleDebug` 결과: `BUILD SUCCESSFUL`.
- 무엇/왜/어떻게: 비밀후원 체크 시 메시지 힌트가 기본 상태를 유지하도록 로직을 분리한 뒤 회귀를 확인했다. 명령: `./gradlew :app:testDebugUnitTest :app:assembleDebug` 결과: `BUILD SUCCESSFUL`.

View File

@@ -0,0 +1,9 @@
- [x] 채널 후원하기 버튼 노출 제어 위치와 내 페이지 판별 조건을 확인한다.
- [x] 내 페이지일 때 채널 후원하기 버튼이 숨김 처리되도록 수정한다.
- [x] 관련 검증(진단/테스트/빌드) 결과를 기록한다.
## 검증 기록
- 무엇/왜/어떻게: 채널 후원하기 버튼의 노출 조건을 코드에서 직접 확인했다. `setupChannelDonationView()`에서 `userId == SharedPreferenceManager.userId` 비교로 내 페이지 여부를 판별하고, 내 페이지면 `llChannelDonation``View.GONE` 처리하도록 반영했다.
- 무엇/왜/어떻게: 수정 파일 정적 진단을 위해 `lsp_diagnostics(UserProfileActivity.kt)`를 실행했다. 현재 환경에 `.kt` LSP 서버가 없어 도구 기반 진단은 수행 불가 메시지를 확인했다.
- 무엇/왜/어떻게: 회귀 여부 확인을 위해 테스트/빌드를 실행했다. 명령: `./gradlew :app:testDebugUnitTest :app:assembleDebug` 결과: `BUILD SUCCESSFUL`.