댓글 입력 비어 있을 때 전송 방지

This commit is contained in:
2026-02-04 17:10:30 +09:00
parent fc43022a95
commit 48f7bf631e

View File

@@ -81,7 +81,12 @@ class UserProfileCheersAdapter(
binding.tvModify.setOnClickListener {
binding.rlContentModify.visibility = View.GONE
binding.tvContent.visibility = View.VISIBLE
modifyCheers(cheers.cheersId, binding.etContentModify.text.toString())
val content = binding.etContentModify.text.toString()
binding.etContentModify.setText("")
if (content.isEmpty()) return@setOnClickListener
modifyCheers(cheers.cheersId, content)
}
} else {
binding.ivMenu.visibility = View.GONE
@@ -100,6 +105,8 @@ class UserProfileCheersAdapter(
binding.rlCheerReply.visibility = View.VISIBLE
binding.tvSend.setOnClickListener {
val content = binding.etCheerReply.text.toString()
binding.etCheerReply.setText("")
if (content.isEmpty()) return@setOnClickListener
modifyReply(reply.cheersId, content)
}
}
@@ -114,6 +121,8 @@ class UserProfileCheersAdapter(
binding.rlCheerReply.visibility = View.VISIBLE
binding.tvSend.setOnClickListener {
val content = binding.etCheerReply.text.toString()
binding.etCheerReply.setText("")
if (content.isEmpty()) return@setOnClickListener
enterReply(cheers.cheersId, content)
}
}
@@ -122,6 +131,8 @@ class UserProfileCheersAdapter(
}
}
binding.etCheerReply.setText("")
binding.etContentModify.setText("")
binding.tvReply.requestLayout()
}
}