라이브, 콘텐츠, 채널 공유하기
- sns 공유시 보여줄 og data 제거 - shorturl이 적용되지 않은 상태에서 url이 너무 길기 떄문데 임시 적용
This commit is contained in:
parent
7885200af4
commit
6065b353fd
|
@ -777,11 +777,7 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
|
||||||
|
|
||||||
binding.tvShare.visibility = View.VISIBLE
|
binding.tvShare.visibility = View.VISIBLE
|
||||||
binding.tvShare.setOnClickListener {
|
binding.tvShare.setOnClickListener {
|
||||||
viewModel.shareContent(
|
viewModel.shareContent(audioContentId = audioContentId) {
|
||||||
audioContentId = audioContentId,
|
|
||||||
contentImage = response.coverImageUrl,
|
|
||||||
contentTitle = "${response.title} - ${response.creator.nickname}"
|
|
||||||
) {
|
|
||||||
val intent = Intent(Intent.ACTION_SEND)
|
val intent = Intent(Intent.ACTION_SEND)
|
||||||
intent.type = "text/plain"
|
intent.type = "text/plain"
|
||||||
intent.putExtra(Intent.EXTRA_TEXT, it)
|
intent.putExtra(Intent.EXTRA_TEXT, it)
|
||||||
|
|
|
@ -299,17 +299,12 @@ class AudioContentDetailViewModel(
|
||||||
|
|
||||||
fun shareContent(
|
fun shareContent(
|
||||||
audioContentId: Long,
|
audioContentId: Long,
|
||||||
contentImage: String,
|
|
||||||
contentTitle: String,
|
|
||||||
onSuccess: (String) -> Unit
|
onSuccess: (String) -> Unit
|
||||||
) {
|
) {
|
||||||
val params = mapOf(
|
val params = mapOf(
|
||||||
"af_dp" to "voiceon://",
|
"af_dp" to "voiceon://",
|
||||||
"deep_link_value" to "content",
|
"deep_link_value" to "content",
|
||||||
"deep_link_sub5" to "$audioContentId",
|
"deep_link_sub5" to "$audioContentId"
|
||||||
"af_og_title" to contentTitle,
|
|
||||||
"af_og_description" to "지금 보이스온에서 이 콘텐츠 감상하기",
|
|
||||||
"af_og_image" to contentImage
|
|
||||||
)
|
)
|
||||||
|
|
||||||
val shareUrl = Utils.createOneLinkUrl(params = params)
|
val shareUrl = Utils.createOneLinkUrl(params = params)
|
||||||
|
|
|
@ -648,8 +648,7 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
|
||||||
layoutUserProfile.ivShare.setOnClickListener {
|
layoutUserProfile.ivShare.setOnClickListener {
|
||||||
viewModel.shareChannel(
|
viewModel.shareChannel(
|
||||||
userId = creator.creatorId,
|
userId = creator.creatorId,
|
||||||
nickname = creator.nickname,
|
nickname = creator.nickname
|
||||||
profileImage = creator.profileUrl
|
|
||||||
) {
|
) {
|
||||||
val intent = Intent(Intent.ACTION_SEND)
|
val intent = Intent(Intent.ACTION_SEND)
|
||||||
intent.type = "text/plain"
|
intent.type = "text/plain"
|
||||||
|
|
|
@ -268,16 +268,12 @@ class UserProfileViewModel(
|
||||||
fun shareChannel(
|
fun shareChannel(
|
||||||
userId: Long,
|
userId: Long,
|
||||||
nickname: String,
|
nickname: String,
|
||||||
profileImage: String,
|
|
||||||
onSuccess: (String) -> Unit
|
onSuccess: (String) -> Unit
|
||||||
) {
|
) {
|
||||||
val params = mapOf(
|
val params = mapOf(
|
||||||
"af_dp" to "voiceon://",
|
"af_dp" to "voiceon://",
|
||||||
"deep_link_value" to "channel",
|
"deep_link_value" to "channel",
|
||||||
"deep_link_sub5" to "$userId",
|
"deep_link_sub5" to "$userId"
|
||||||
"af_og_title" to "보이스온",
|
|
||||||
"af_og_description" to "보이스온 ${nickname}님의 채널입니다.",
|
|
||||||
"af_og_image" to profileImage
|
|
||||||
)
|
)
|
||||||
val shareUrl = Utils.createOneLinkUrl(params = params)
|
val shareUrl = Utils.createOneLinkUrl(params = params)
|
||||||
onSuccess("보이스온 ${nickname}님의 채널입니다.\n$shareUrl")
|
onSuccess("보이스온 ${nickname}님의 채널입니다.\n$shareUrl")
|
||||||
|
|
|
@ -1005,8 +1005,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
viewModel.shareRoomLink(
|
viewModel.shareRoomLink(
|
||||||
response.roomId,
|
response.roomId,
|
||||||
response.isPrivateRoom,
|
response.isPrivateRoom,
|
||||||
response.password,
|
response.password
|
||||||
response.coverImageUrl
|
|
||||||
) {
|
) {
|
||||||
val intent = Intent(Intent.ACTION_SEND)
|
val intent = Intent(Intent.ACTION_SEND)
|
||||||
intent.type = "text/plain"
|
intent.type = "text/plain"
|
||||||
|
|
|
@ -300,16 +300,12 @@ class LiveRoomViewModel(
|
||||||
roomId: Long,
|
roomId: Long,
|
||||||
isPrivateRoom: Boolean,
|
isPrivateRoom: Boolean,
|
||||||
password: String?,
|
password: String?,
|
||||||
coverImage: String,
|
|
||||||
onSuccess: (String) -> Unit
|
onSuccess: (String) -> Unit
|
||||||
) {
|
) {
|
||||||
val params = mapOf(
|
val params = mapOf(
|
||||||
"af_dp" to "voiceon://",
|
"af_dp" to "voiceon://",
|
||||||
"deep_link_value" to "live",
|
"deep_link_value" to "live",
|
||||||
"deep_link_sub5" to "$roomId",
|
"deep_link_sub5" to "$roomId"
|
||||||
"af_og_title" to "보이스온",
|
|
||||||
"af_og_description" to "지금 보이스온에서 라이브 참여하기",
|
|
||||||
"af_og_image" to coverImage
|
|
||||||
)
|
)
|
||||||
|
|
||||||
val shareUrl = Utils.createOneLinkUrl(params = params)
|
val shareUrl = Utils.createOneLinkUrl(params = params)
|
||||||
|
|
|
@ -67,9 +67,7 @@ class LiveRoomDetailViewModel(private val repository: LiveRepository) : BaseView
|
||||||
val params = mapOf(
|
val params = mapOf(
|
||||||
"af_dp" to "voiceon://",
|
"af_dp" to "voiceon://",
|
||||||
"deep_link_value" to "live",
|
"deep_link_value" to "live",
|
||||||
"deep_link_sub5" to "$roomId",
|
"deep_link_sub5" to "$roomId"
|
||||||
"af_og_title" to "보이스온",
|
|
||||||
"af_og_description" to "지금 보이스온에서 라이브 참여하기"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
val shareUrl = Utils.createOneLinkUrl(params = params)
|
val shareUrl = Utils.createOneLinkUrl(params = params)
|
||||||
|
|
Loading…
Reference in New Issue