parent
63193c82a1
commit
62abd3c900
|
@ -40,8 +40,8 @@ android {
|
||||||
applicationId "kr.co.vividnext.sodalive"
|
applicationId "kr.co.vividnext.sodalive"
|
||||||
minSdk 23
|
minSdk 23
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 96
|
versionCode 97
|
||||||
versionName "1.15.1"
|
versionName "1.15.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
@ -703,37 +703,35 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
View.GONE
|
View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
binding.flDonationMessageList.setOnClickListener {
|
||||||
response.creatorId == SharedPreferenceManager.userId &&
|
LiveRoomDonationMessageDialog(
|
||||||
SharedPreferenceManager.role == MemberRole.CREATOR.name
|
layoutInflater = LayoutInflater.from(this),
|
||||||
) {
|
creatorId = response.creatorId,
|
||||||
binding.flDonationMessageList.visibility = View.VISIBLE
|
activity = this,
|
||||||
binding.flDonationMessageList.setOnClickListener {
|
donationMessageListLiveData = donationMessageViewModel
|
||||||
LiveRoomDonationMessageDialog(
|
.donationMessageListLiveData,
|
||||||
layoutInflater = LayoutInflater.from(this),
|
donationMessageCountLiveData = donationMessageViewModel
|
||||||
activity = this,
|
.donationMessageCountLiveData,
|
||||||
donationMessageListLiveData = donationMessageViewModel
|
getDonationMessageList = {
|
||||||
.donationMessageListLiveData,
|
donationMessageViewModel.getDonationMessageList(roomId = roomId)
|
||||||
donationMessageCountLiveData = donationMessageViewModel
|
},
|
||||||
.donationMessageCountLiveData,
|
deleteDonationMessage = {
|
||||||
getDonationMessageList = {
|
if (
|
||||||
donationMessageViewModel.getDonationMessageList(roomId = roomId)
|
response.creatorId == SharedPreferenceManager.userId &&
|
||||||
},
|
SharedPreferenceManager.role == MemberRole.CREATOR.name
|
||||||
deleteDonationMessage = {
|
) {
|
||||||
donationMessageViewModel.deleteDonationMessage(
|
donationMessageViewModel.deleteDonationMessage(
|
||||||
roomId = roomId,
|
roomId = roomId,
|
||||||
uuid = it
|
uuid = it
|
||||||
)
|
)
|
||||||
},
|
|
||||||
copyMessage = {
|
|
||||||
val clipboard = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
|
|
||||||
clipboard.setPrimaryClip(ClipData.newPlainText(it, it))
|
|
||||||
showToast("후원 히스토리가 복사되었습니다.")
|
|
||||||
}
|
}
|
||||||
).show()
|
},
|
||||||
}
|
copyMessage = {
|
||||||
} else {
|
val clipboard = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
|
||||||
binding.flDonationMessageList.visibility = View.GONE
|
clipboard.setPrimaryClip(ClipData.newPlainText(it, it))
|
||||||
|
showToast("후원 히스토리가 복사되었습니다.")
|
||||||
|
}
|
||||||
|
).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
speakerListAdapter.managerId = response.creatorId
|
speakerListAdapter.managerId = response.creatorId
|
||||||
|
@ -1258,6 +1256,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
agora.muteAllRemoteAudioStreams(isSpeakerMute)
|
agora.muteAllRemoteAudioStreams(isSpeakerMute)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
private fun inputChat() {
|
private fun inputChat() {
|
||||||
val nickname = viewModel.getUserNickname(SharedPreferenceManager.userId.toInt())
|
val nickname = viewModel.getUserNickname(SharedPreferenceManager.userId.toInt())
|
||||||
val profileUrl = viewModel.getUserProfileUrl(SharedPreferenceManager.userId.toInt())
|
val profileUrl = viewModel.getUserProfileUrl(SharedPreferenceManager.userId.toInt())
|
||||||
|
|
|
@ -7,9 +7,12 @@ import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.DiffUtil
|
import androidx.recyclerview.widget.DiffUtil
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kr.co.vividnext.sodalive.R
|
import kr.co.vividnext.sodalive.R
|
||||||
|
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
|
||||||
import kr.co.vividnext.sodalive.databinding.ItemLiveRoomDonationMessageBinding
|
import kr.co.vividnext.sodalive.databinding.ItemLiveRoomDonationMessageBinding
|
||||||
|
import kr.co.vividnext.sodalive.settings.notification.MemberRole
|
||||||
|
|
||||||
class LiveRoomDonationMessageAdapter(
|
class LiveRoomDonationMessageAdapter(
|
||||||
|
private val creatorId: Long,
|
||||||
private val onClickDeleteMessage: (String) -> Unit,
|
private val onClickDeleteMessage: (String) -> Unit,
|
||||||
private val copyMessage: (String) -> Unit
|
private val copyMessage: (String) -> Unit
|
||||||
) : RecyclerView.Adapter<LiveRoomDonationMessageAdapter.ViewHolder>() {
|
) : RecyclerView.Adapter<LiveRoomDonationMessageAdapter.ViewHolder>() {
|
||||||
|
@ -33,7 +36,16 @@ class LiveRoomDonationMessageAdapter(
|
||||||
binding.root.setBackgroundResource(R.drawable.bg_round_corner_5_3_ccc25264)
|
binding.root.setBackgroundResource(R.drawable.bg_round_corner_5_3_ccc25264)
|
||||||
}
|
}
|
||||||
binding.tvDonationMessage.text = "\"${item.donationMessage}\""
|
binding.tvDonationMessage.text = "\"${item.donationMessage}\""
|
||||||
binding.ivDelete.setOnClickListener { onClickDeleteMessage(item.uuid) }
|
|
||||||
|
if (
|
||||||
|
creatorId == SharedPreferenceManager.userId &&
|
||||||
|
SharedPreferenceManager.role == MemberRole.CREATOR.name
|
||||||
|
) {
|
||||||
|
binding.ivDelete.visibility = View.VISIBLE
|
||||||
|
binding.ivDelete.setOnClickListener { onClickDeleteMessage(item.uuid) }
|
||||||
|
} else {
|
||||||
|
binding.ivDelete.visibility = View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
binding.root.setOnClickListener { copyMessage(item.donationMessage) }
|
binding.root.setOnClickListener { copyMessage(item.donationMessage) }
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ import kr.co.vividnext.sodalive.extensions.moneyFormat
|
||||||
|
|
||||||
class LiveRoomDonationMessageDialog(
|
class LiveRoomDonationMessageDialog(
|
||||||
layoutInflater: LayoutInflater,
|
layoutInflater: LayoutInflater,
|
||||||
|
creatorId: Long,
|
||||||
private val activity: FragmentActivity,
|
private val activity: FragmentActivity,
|
||||||
private val donationMessageListLiveData: LiveData<List<LiveRoomDonationMessage>>,
|
private val donationMessageListLiveData: LiveData<List<LiveRoomDonationMessage>>,
|
||||||
private val donationMessageCountLiveData: LiveData<Int>,
|
private val donationMessageCountLiveData: LiveData<Int>,
|
||||||
|
@ -29,6 +30,7 @@ class LiveRoomDonationMessageDialog(
|
||||||
private val alertDialog: AlertDialog
|
private val alertDialog: AlertDialog
|
||||||
private val dialogView = DialogLiveRoomDonationMessageBinding.inflate(layoutInflater)
|
private val dialogView = DialogLiveRoomDonationMessageBinding.inflate(layoutInflater)
|
||||||
private val adapter = LiveRoomDonationMessageAdapter(
|
private val adapter = LiveRoomDonationMessageAdapter(
|
||||||
|
creatorId = creatorId,
|
||||||
onClickDeleteMessage = { deleteDonationMessage(it) },
|
onClickDeleteMessage = { deleteDonationMessage(it) },
|
||||||
copyMessage = copyMessage
|
copyMessage = copyMessage
|
||||||
)
|
)
|
||||||
|
|
|
@ -526,7 +526,6 @@
|
||||||
android:id="@+id/fl_speaker_mute"
|
android:id="@+id/fl_speaker_mute"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_marginBottom="40dp"
|
android:layout_marginBottom="40dp"
|
||||||
android:background="@drawable/bg_round_corner_10_99525252"
|
android:background="@drawable/bg_round_corner_10_99525252"
|
||||||
android:padding="10dp">
|
android:padding="10dp">
|
||||||
|
@ -614,8 +613,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="13.3dp"
|
android:layout_marginBottom="13.3dp"
|
||||||
android:background="@drawable/bg_round_corner_10_99525252"
|
android:background="@drawable/bg_round_corner_10_99525252"
|
||||||
android:padding="10dp"
|
android:padding="10dp">
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_donation_message_list"
|
android:id="@+id/iv_donation_message_list"
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/ic_close_white"
|
android:src="@drawable/ic_close_white"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue