fix(live-room): 채팅 얼림 상태 터치 경고 동작을 복구한다
This commit is contained in:
@@ -253,7 +253,10 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
|
||||
private fun updateChatInputState() {
|
||||
val canInputChat = isHost || !isChatFrozen
|
||||
binding.etChat.isEnabled = canInputChat
|
||||
binding.etChat.isEnabled = true
|
||||
binding.etChat.isFocusable = canInputChat
|
||||
binding.etChat.isFocusableInTouchMode = canInputChat
|
||||
binding.etChat.isCursorVisible = canInputChat
|
||||
binding.ivSend.isEnabled = canInputChat
|
||||
binding.ivSend.alpha = if (canInputChat) {
|
||||
1f
|
||||
@@ -441,6 +444,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
// endregion
|
||||
|
||||
// region setupView
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun setupView() {
|
||||
bindData()
|
||||
|
||||
@@ -631,6 +635,17 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
view.clearFocus()
|
||||
}
|
||||
}
|
||||
binding.etChat.setOnTouchListener { view, event ->
|
||||
if (isChatFrozen && !isHost) {
|
||||
if (event.action == MotionEvent.ACTION_UP) {
|
||||
view.performClick()
|
||||
showChatFreezeWarning()
|
||||
}
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
binding.tvQuit.setOnClickListener { onClickQuit() }
|
||||
binding.flMicrophoneMute.setOnClickListener {
|
||||
microphoneMute()
|
||||
|
||||
Reference in New Issue
Block a user