fix(character-main): 최근 대화 캐릭터

- 터치시 채팅방이 아닌 캐릭터 상세 페이지로 이동
This commit is contained in:
2025-08-28 20:00:04 +09:00
parent 8b241709e1
commit 201ab488b2
3 changed files with 3 additions and 8 deletions

View File

@@ -21,7 +21,6 @@ import kr.co.vividnext.sodalive.chat.character.curation.CurationSectionAdapter
import kr.co.vividnext.sodalive.chat.character.detail.CharacterDetailActivity
import kr.co.vividnext.sodalive.chat.character.detail.CharacterDetailActivity.Companion.EXTRA_CHARACTER_ID
import kr.co.vividnext.sodalive.chat.character.recent.RecentCharacterAdapter
import kr.co.vividnext.sodalive.chat.talk.room.ChatRoomActivity
import kr.co.vividnext.sodalive.common.LoadingDialog
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.databinding.FragmentCharacterTabBinding
@@ -128,7 +127,7 @@ class CharacterTabFragment : BaseFragment<FragmentCharacterTabBinding>(
private fun setupRecentCharactersRecyclerView() {
// 최근 대화한 캐릭터 RecyclerView 설정
recentCharacterAdapter = RecentCharacterAdapter {
onRecentCharacterClick(it)
onCharacterClick(it)
}
val recyclerView = binding.rvRecentCharacters
@@ -412,10 +411,6 @@ class CharacterTabFragment : BaseFragment<FragmentCharacterTabBinding>(
}
}
private fun onRecentCharacterClick(roomId: Long) {
startActivity(ChatRoomActivity.newIntent(requireContext(), roomId))
}
private fun onCharacterClick(characterId: Long) {
ensureLoginAndAuth {
startActivity(

View File

@@ -5,7 +5,7 @@ import com.google.gson.annotations.SerializedName
@Keep
data class RecentCharacter(
@SerializedName("roomId") val roomId: Long,
@SerializedName("characterId") val characterId: Long,
@SerializedName("name") val name: String,
@SerializedName("imageUrl") val imageUrl: String
)

View File

@@ -31,7 +31,7 @@ class RecentCharacterAdapter(
)
.into(binding.ivProfile)
binding.root.setOnClickListener { onCharacterClick(character.roomId) }
binding.root.setOnClickListener { onCharacterClick(character.characterId) }
}
}