fix(profile): 프로필 SNS 필드를 오픈채팅 기준으로 통일한다

This commit is contained in:
2026-02-24 20:01:38 +09:00
parent 63a52629a9
commit c74d27f4ab
16 changed files with 103 additions and 127 deletions

View File

@@ -12,8 +12,9 @@ data class MyPageResponse(
@SerializedName("point") val point: Int,
@SerializedName("youtubeUrl") val youtubeUrl: String?,
@SerializedName("instagramUrl") val instagramUrl: String?,
@SerializedName("websiteUrl") val websiteUrl: String?,
@SerializedName("blogUrl") val blogUrl: String?,
@SerializedName("kakaoOpenChatUrl") val kakaoOpenChatUrl: String?,
@SerializedName("fancimmUrl") val fancimmUrl: String?,
@SerializedName("xUrl") val xUrl: String?,
@SerializedName("liveReservationCount") val liveReservationCount: Int,
@SerializedName("likeCount") val likeCount: Int,
@SerializedName("isAuth") val isAuth: Boolean

View File

@@ -15,8 +15,7 @@ data class ProfileResponse(
@SerializedName("rewardCan") val rewardCan: Int,
@SerializedName("youtubeUrl") val youtubeUrl: String?,
@SerializedName("instagramUrl") val instagramUrl: String?,
@SerializedName("blogUrl") val blogUrl: String?,
@SerializedName("websiteUrl") val websiteUrl: String?,
@SerializedName("kakaoOpenChatUrl") val kakaoOpenChatUrl: String?,
@SerializedName("fancimmUrl") val fancimmUrl: String?,
@SerializedName("xUrl") val xUrl: String?,
@SerializedName("introduce") val introduce: String,

View File

@@ -75,16 +75,6 @@ class ProfileUpdateActivity : BaseActivity<ActivityProfileUpdateBinding>(
}
private fun bindData() {
compositeDisposable.add(
binding.etBlog.textChanges().skip(1)
.debounce(500, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe {
viewModel.blogUrl = it.toString()
}
)
compositeDisposable.add(
binding.etFancimm.textChanges().skip(1)
.debounce(500, TimeUnit.MILLISECONDS)
@@ -106,12 +96,12 @@ class ProfileUpdateActivity : BaseActivity<ActivityProfileUpdateBinding>(
)
compositeDisposable.add(
binding.etWebsite.textChanges().skip(1)
binding.etOpenChat.textChanges().skip(1)
.debounce(500, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe {
viewModel.websiteUrl = it.toString()
viewModel.kakaoOpenChatUrl = it.toString()
}
)
@@ -160,8 +150,7 @@ class ProfileUpdateActivity : BaseActivity<ActivityProfileUpdateBinding>(
binding.tvNickname.text = it.nickname
it.youtubeUrl?.let { url -> binding.etYoutube.setText(url) }
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.kakaoOpenChatUrl?.let { url -> binding.etOpenChat.setText(url) }
it.fancimmUrl?.let { url -> binding.etFancimm.setText(url) }
it.xUrl?.let { url -> binding.etX.setText(url) }
binding.etIntroduce.setText(it.introduce)

View File

@@ -17,8 +17,7 @@ data class ProfileUpdateRequest(
@SerializedName("introduce") val introduce: String? = null,
@SerializedName("youtubeUrl") val youtubeUrl: String? = null,
@SerializedName("instagramUrl") val instagramUrl: String? = null,
@SerializedName("websiteUrl") val websiteUrl: String? = null,
@SerializedName("blogUrl") val blogUrl: String? = null,
@SerializedName("kakaoOpenChatUrl") val kakaoOpenChatUrl: String? = null,
@SerializedName("fancimmUrl") val fancimmUrl: String? = null,
@SerializedName("xUrl") val xUrl: String? = null,
@SerializedName("isVisibleDonationRank") val isVisibleDonationRank: Boolean? = null,

View File

@@ -20,8 +20,7 @@ class ProfileUpdateViewModel(private val repository: UserRepository) : BaseViewM
var youtubeUrl = ""
var instagramUrl = ""
var websiteUrl = ""
var blogUrl = ""
var kakaoOpenChatUrl = ""
var fancimmUrl = ""
var xUrl = ""
var introduce = ""
@@ -67,8 +66,7 @@ class ProfileUpdateViewModel(private val repository: UserRepository) : BaseViewM
profileResponse = it.data
youtubeUrl = profileResponse.youtubeUrl ?: ""
instagramUrl = profileResponse.instagramUrl ?: ""
websiteUrl = profileResponse.websiteUrl ?: ""
blogUrl = profileResponse.blogUrl ?: ""
kakaoOpenChatUrl = profileResponse.kakaoOpenChatUrl ?: ""
fancimmUrl = profileResponse.fancimmUrl ?: ""
xUrl = profileResponse.xUrl ?: ""
introduce = profileResponse.introduce
@@ -134,8 +132,7 @@ class ProfileUpdateViewModel(private val repository: UserRepository) : BaseViewM
if (
profileResponse.youtubeUrl != youtubeUrl ||
profileResponse.instagramUrl != instagramUrl ||
profileResponse.blogUrl != blogUrl ||
profileResponse.websiteUrl != websiteUrl ||
profileResponse.kakaoOpenChatUrl != kakaoOpenChatUrl ||
profileResponse.fancimmUrl != fancimmUrl ||
profileResponse.xUrl != xUrl ||
profileResponse.gender != _genderLiveData.value ||
@@ -156,13 +153,8 @@ class ProfileUpdateViewModel(private val repository: UserRepository) : BaseViewM
} else {
null
},
blogUrl = if (profileResponse.blogUrl != blogUrl) {
blogUrl
} else {
null
},
websiteUrl = if (profileResponse.websiteUrl != websiteUrl) {
websiteUrl
kakaoOpenChatUrl = if (profileResponse.kakaoOpenChatUrl != kakaoOpenChatUrl) {
kakaoOpenChatUrl
} else {
null
},