This commit is contained in:
faisalcodes 2023-01-30 12:16:35 +05:30
parent 042cf26c1c
commit bb784f5880
2 changed files with 5 additions and 2 deletions

View File

@ -92,7 +92,10 @@ class CommentsAdapter(
val repliesFragment = CommentsRepliesFragment().apply { val repliesFragment = CommentsRepliesFragment().apply {
arguments = Bundle().apply { arguments = Bundle().apply {
putString(IntentData.videoId, videoId) putString(IntentData.videoId, videoId)
putString(IntentData.comment, Json.encodeToString(Comment.serializer(), comment)) putString(
IntentData.comment,
Json.encodeToString(Comment.serializer(), comment)
)
} }
} }
root.setOnClickListener { root.setOnClickListener {

View File

@ -45,7 +45,7 @@ class CommentsRepliesFragment : Fragment() {
val videoId = arguments?.getString(IntentData.videoId) ?: "" val videoId = arguments?.getString(IntentData.videoId) ?: ""
val comment = Json.decodeFromString( val comment = Json.decodeFromString(
Comment.serializer(), Comment.serializer(),
arguments?.getString(IntentData.comment) ?: """{}""", arguments?.getString(IntentData.comment) ?: """{}"""
) )
repliesAdapter = CommentsAdapter(null, videoId, mutableListOf(comment), true) { repliesAdapter = CommentsAdapter(null, videoId, mutableListOf(comment), true) {