크리에이터 프로필 수정 시 팬심M 및 X URL 등록 기능 추가

크리에이터 프로필 수정 화면에서 팬심M과 X(구 트위터)의 URL을
입력하고 저장할 수 있도록 기능을 개선했습니다.

- ProfileUpdateRequest 및 ProfileResponse에 관련 필드 추가
- ProfileUpdateViewModel에 URL 관리 및 업데이트 로직 추가
- UI 레이아웃에 팬심M, X 입력 필드 추가 및 다국어 리소스 반영
- ProfileUpdateActivity에서 입력 필드 연동 및 초기값 설정
This commit is contained in:
2026-02-23 11:16:30 +09:00
parent 99f2715601
commit a78a6638da
9 changed files with 126 additions and 1 deletions

View File

@@ -17,6 +17,8 @@ data class ProfileResponse(
@SerializedName("instagramUrl") val instagramUrl: String?,
@SerializedName("blogUrl") val blogUrl: String?,
@SerializedName("websiteUrl") val websiteUrl: String?,
@SerializedName("fancimmUrl") val fancimmUrl: String?,
@SerializedName("xUrl") val xUrl: String?,
@SerializedName("introduce") val introduce: String,
@SerializedName("tags") val tags: List<String>
)

View File

@@ -85,6 +85,26 @@ class ProfileUpdateActivity : BaseActivity<ActivityProfileUpdateBinding>(
}
)
compositeDisposable.add(
binding.etFancimm.textChanges().skip(1)
.debounce(500, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe {
viewModel.fancimmUrl = it.toString()
}
)
compositeDisposable.add(
binding.etX.textChanges().skip(1)
.debounce(500, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe {
viewModel.xUrl = it.toString()
}
)
compositeDisposable.add(
binding.etWebsite.textChanges().skip(1)
.debounce(500, TimeUnit.MILLISECONDS)
@@ -142,6 +162,8 @@ class ProfileUpdateActivity : BaseActivity<ActivityProfileUpdateBinding>(
it.instagramUrl?.let { url -> binding.etInstagram.setText(url) }
it.websiteUrl?.let { url -> binding.etWebsite.setText(url) }
it.blogUrl?.let { url -> binding.etBlog.setText(url) }
it.fancimmUrl?.let { url -> binding.etFancimm.setText(url) }
it.xUrl?.let { url -> binding.etX.setText(url) }
binding.etIntroduce.setText(it.introduce)
SharedPreferenceManager.nickname = it.nickname

View File

@@ -19,6 +19,8 @@ data class ProfileUpdateRequest(
@SerializedName("instagramUrl") val instagramUrl: String? = null,
@SerializedName("websiteUrl") val websiteUrl: String? = null,
@SerializedName("blogUrl") val blogUrl: String? = null,
@SerializedName("fancimmUrl") val fancimmUrl: String? = null,
@SerializedName("xUrl") val xUrl: String? = null,
@SerializedName("isVisibleDonationRank") val isVisibleDonationRank: Boolean? = null,
@SerializedName("donationRankingPeriod") val donationRankingPeriod: DonationRankingPeriod? = null,
@SerializedName("container") val container: String = "aos"

View File

@@ -22,6 +22,8 @@ class ProfileUpdateViewModel(private val repository: UserRepository) : BaseViewM
var instagramUrl = ""
var websiteUrl = ""
var blogUrl = ""
var fancimmUrl = ""
var xUrl = ""
var introduce = ""
var currentPassword = ""
@@ -63,6 +65,13 @@ class ProfileUpdateViewModel(private val repository: UserRepository) : BaseViewM
{
if (it.success && it.data != null) {
profileResponse = it.data
youtubeUrl = profileResponse.youtubeUrl ?: ""
instagramUrl = profileResponse.instagramUrl ?: ""
websiteUrl = profileResponse.websiteUrl ?: ""
blogUrl = profileResponse.blogUrl ?: ""
fancimmUrl = profileResponse.fancimmUrl ?: ""
xUrl = profileResponse.xUrl ?: ""
introduce = profileResponse.introduce
tags.addAll(profileResponse.tags)
_selectedTagLiveData.postValue(profileResponse.tags)
_genderLiveData.postValue(profileResponse.gender)
@@ -127,6 +136,8 @@ class ProfileUpdateViewModel(private val repository: UserRepository) : BaseViewM
profileResponse.instagramUrl != instagramUrl ||
profileResponse.blogUrl != blogUrl ||
profileResponse.websiteUrl != websiteUrl ||
profileResponse.fancimmUrl != fancimmUrl ||
profileResponse.xUrl != xUrl ||
profileResponse.gender != _genderLiveData.value ||
insertTags.isNotEmpty() ||
removeTags.isNotEmpty() ||
@@ -155,6 +166,16 @@ class ProfileUpdateViewModel(private val repository: UserRepository) : BaseViewM
} else {
null
},
fancimmUrl = if (profileResponse.fancimmUrl != fancimmUrl) {
fancimmUrl
} else {
null
},
xUrl = if (profileResponse.xUrl != xUrl) {
xUrl
} else {
null
},
gender = if (profileResponse.gender != _genderLiveData.value) {
_genderLiveData.value
} else {