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

@@ -46,8 +46,9 @@ data class CreatorResponse(
@SerializedName("introduce") val introduce: String = "",
@SerializedName("instagramUrl") val instagramUrl: String? = null,
@SerializedName("youtubeUrl") val youtubeUrl: 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("isAvailableChat") val isAvailableChat: Boolean = true,
@SerializedName("isFollow") val isFollow: Boolean,
@SerializedName("isNotify") val isNotify: Boolean,
@@ -112,5 +113,3 @@ data class GetCreatorActivitySummary(
@SerializedName("liveContributorCount") val liveContributorCount: Int,
@SerializedName("contentCount") val contentCount: Int
)

View File

@@ -37,8 +37,9 @@ data class GetRoomDetailManager(
@SerializedName("introduce") val introduce: String,
@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("profileImageUrl") val profileImageUrl: String,
@SerializedName("isCreator") val isCreator: Boolean
) : Parcelable

View File

@@ -33,6 +33,7 @@ import kr.co.vividnext.sodalive.settings.language.LocaleHelper
import org.koin.android.ext.android.inject
import java.util.Locale
import java.util.TimeZone
import androidx.core.net.toUri
class LiveRoomDetailFragment(
private val roomId: Long,
@@ -273,26 +274,14 @@ class LiveRoomDetailFragment(
}
if (
manager.websiteUrl.isNullOrBlank() ||
!URLUtil.isValidUrl(manager.websiteUrl)
manager.kakaoOpenChatUrl.isNullOrBlank() ||
!URLUtil.isValidUrl(manager.kakaoOpenChatUrl)
) {
binding.ivManagerWebsite.visibility = View.GONE
binding.ivManagerOpenChat.visibility = View.GONE
} else {
binding.ivManagerWebsite.visibility = View.VISIBLE
binding.ivManagerWebsite.setOnClickListener {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(manager.websiteUrl)))
}
}
if (
manager.blogUrl.isNullOrBlank() ||
!URLUtil.isValidUrl(manager.blogUrl)
) {
binding.ivManagerBlog.visibility = View.GONE
} else {
binding.ivManagerBlog.visibility = View.VISIBLE
binding.ivManagerBlog.setOnClickListener {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(manager.blogUrl)))
binding.ivManagerOpenChat.visibility = View.VISIBLE
binding.ivManagerOpenChat.setOnClickListener {
startActivity(Intent(Intent.ACTION_VIEW, manager.kakaoOpenChatUrl.toUri()))
}
}
@@ -304,7 +293,7 @@ class LiveRoomDetailFragment(
} else {
binding.ivManagerInstagram.visibility = View.VISIBLE
binding.ivManagerInstagram.setOnClickListener {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(manager.instagramUrl)))
startActivity(Intent(Intent.ACTION_VIEW, manager.instagramUrl.toUri()))
}
}
@@ -316,7 +305,7 @@ class LiveRoomDetailFragment(
} else {
binding.ivManagerYoutube.visibility = View.VISIBLE
binding.ivManagerYoutube.setOnClickListener {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(manager.youtubeUrl)))
startActivity(Intent(Intent.ACTION_VIEW, manager.youtubeUrl.toUri()))
}
}

View File

@@ -11,8 +11,9 @@ data class GetLiveRoomUserProfileResponse(
@SerializedName("gender") val gender: String,
@SerializedName("instagramUrl") val instagramUrl: String,
@SerializedName("youtubeUrl") val youtubeUrl: 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("introduce") val introduce: String,
@SerializedName("tags") val tags: String,
@SerializedName("isSpeaker") val isSpeaker: Boolean?,

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
},