팬토크

- 응원글 등록/수정/삭제시 전체 데이터를 지우고 다시 조회하도록 수정
This commit is contained in:
klaus 2024-08-08 02:19:26 +09:00
parent b98cc8ed79
commit 00774739ed
1 changed files with 5 additions and 0 deletions

View File

@ -61,6 +61,7 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
private fun setupCheersView() {
binding.ivSend.setOnClickListener {
hideKeyboard {
cheersAdapter.items.clear()
viewModel.writeCheers(
creatorId = userId,
cheersContent = binding.etCheer.text.toString()
@ -73,6 +74,7 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
userId = userId,
enterReply = { cheersId, content ->
hideKeyboard {
cheersAdapter.items.clear()
viewModel.writeCheers(
parentCheersId = cheersId,
creatorId = userId,
@ -82,6 +84,7 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
},
modifyReply = { cheersId, content ->
hideKeyboard {
cheersAdapter.items.clear()
viewModel.modifyCheers(
cheersId = cheersId,
creatorId = userId,
@ -91,6 +94,7 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
},
modifyCheers = { cheersId, content ->
hideKeyboard {
cheersAdapter.items.clear()
viewModel.modifyCheers(
cheersId = cheersId,
creatorId = userId,
@ -107,6 +111,7 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
desc = "삭제하시겠습니까?",
confirmButtonTitle = "삭제",
confirmButtonClick = {
cheersAdapter.items.clear()
viewModel.modifyCheers(
cheersId = it,
creatorId = userId,