fix(profile): 프로필 SNS 필드를 오픈채팅 기준으로 통일한다
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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?,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -367,50 +367,17 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="6.7dp"
|
||||
android:fontFamily="@font/medium"
|
||||
android:text="@string/screen_profile_update_website_label"
|
||||
android:text="@string/screen_profile_update_open_chat_label"
|
||||
android:textColor="@color/color_eeeeee"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_website"
|
||||
android:id="@+id/et_open_chat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edittext_underline"
|
||||
android:fontFamily="@font/medium"
|
||||
android:hint="@string/screen_profile_update_website_hint"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="textWebEditText"
|
||||
android:paddingHorizontal="6.7dp"
|
||||
android:textColor="@color/color_eeeeee"
|
||||
android:textColorHint="@color/color_777777"
|
||||
android:textCursorDrawable="@drawable/edit_text_cursor"
|
||||
android:textSize="13.3sp"
|
||||
android:theme="@style/EditTextStyle"
|
||||
tools:ignore="LabelFor" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="6.7dp"
|
||||
android:fontFamily="@font/medium"
|
||||
android:text="@string/screen_profile_update_blog_label"
|
||||
android:textColor="@color/color_eeeeee"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_blog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edittext_underline"
|
||||
android:fontFamily="@font/medium"
|
||||
android:hint="@string/screen_profile_update_blog_hint"
|
||||
android:hint="@string/screen_profile_update_open_chat_hint"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="textWebEditText"
|
||||
android:paddingHorizontal="6.7dp"
|
||||
|
||||
@@ -253,20 +253,12 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_manager_website"
|
||||
android:id="@+id/iv_manager_open_chat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_website_blue" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_manager_blog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_blog_blue" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_manager_instagram"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -127,20 +127,12 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_tags">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_website"
|
||||
android:id="@+id/iv_open_chat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_website_circle" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_blog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_blog_circle" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_instagram"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -660,10 +660,8 @@
|
||||
<string name="screen_profile_update_instagram_hint">Instagram URL</string>
|
||||
<string name="screen_profile_update_youtube_label">YouTube channel</string>
|
||||
<string name="screen_profile_update_youtube_hint">YouTube channel URL</string>
|
||||
<string name="screen_profile_update_website_label">Website</string>
|
||||
<string name="screen_profile_update_website_hint">Website URL</string>
|
||||
<string name="screen_profile_update_blog_label">Blog</string>
|
||||
<string name="screen_profile_update_blog_hint">Blog URL</string>
|
||||
<string name="screen_profile_update_open_chat_label">Open Chat</string>
|
||||
<string name="screen_profile_update_open_chat_hint">Open Chat URL</string>
|
||||
<string name="screen_profile_update_fancimm_label">FancimM</string>
|
||||
<string name="screen_profile_update_fancimm_hint">FancimM URL</string>
|
||||
<string name="screen_profile_update_x_label">X</string>
|
||||
|
||||
@@ -660,10 +660,8 @@
|
||||
<string name="screen_profile_update_instagram_hint">Instagram URL</string>
|
||||
<string name="screen_profile_update_youtube_label">YouTubeチャンネル</string>
|
||||
<string name="screen_profile_update_youtube_hint">YouTubeチャンネル URL</string>
|
||||
<string name="screen_profile_update_website_label">ウェブサイト</string>
|
||||
<string name="screen_profile_update_website_hint">ウェブサイト URL</string>
|
||||
<string name="screen_profile_update_blog_label">ブログ</string>
|
||||
<string name="screen_profile_update_blog_hint">ブログ URL</string>
|
||||
<string name="screen_profile_update_open_chat_label">オープンチャット</string>
|
||||
<string name="screen_profile_update_open_chat_hint">オープンチャット URL</string>
|
||||
<string name="screen_profile_update_fancimm_label">FancimM</string>
|
||||
<string name="screen_profile_update_fancimm_hint">FancimM URL</string>
|
||||
<string name="screen_profile_update_x_label">X</string>
|
||||
|
||||
@@ -659,10 +659,8 @@
|
||||
<string name="screen_profile_update_instagram_hint">인스타그램 URL</string>
|
||||
<string name="screen_profile_update_youtube_label">유튜브 채널</string>
|
||||
<string name="screen_profile_update_youtube_hint">유튜브 채널 URL</string>
|
||||
<string name="screen_profile_update_website_label">웹사이트</string>
|
||||
<string name="screen_profile_update_website_hint">웹사이트 URL</string>
|
||||
<string name="screen_profile_update_blog_label">블로그</string>
|
||||
<string name="screen_profile_update_blog_hint">블로그 URL</string>
|
||||
<string name="screen_profile_update_open_chat_label">오픈채팅</string>
|
||||
<string name="screen_profile_update_open_chat_hint">오픈채팅 URL</string>
|
||||
<string name="screen_profile_update_fancimm_label">팬심M</string>
|
||||
<string name="screen_profile_update_fancimm_hint">팬심M URL</string>
|
||||
<string name="screen_profile_update_x_label">X</string>
|
||||
|
||||
Reference in New Issue
Block a user