Avoiding recurring inner note rendering.

This commit is contained in:
Vitor Pamplona
2023-01-22 19:07:32 -03:00
parent 0c2fd3adc0
commit c33f7f615f

View File

@ -1,6 +1,7 @@
package com.vitorpamplona.amethyst.ui.note package com.vitorpamplona.amethyst.ui.note
import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
@ -141,15 +142,16 @@ fun ChatroomMessageCompose(baseNote: Note, innerQuote: Boolean = false, accountV
} }
val replyTo = note.replyTo val replyTo = note.replyTo
if (replyTo != null && replyTo.isNotEmpty()) { if (!innerQuote && replyTo != null && replyTo.isNotEmpty()) {
Row(verticalAlignment = Alignment.CenterVertically) { Row(verticalAlignment = Alignment.CenterVertically) {
replyTo.mapIndexed { index, note -> replyTo.toSet().mapIndexed { index, note ->
ChatroomMessageCompose( if (note.event != null)
note, ChatroomMessageCompose(
innerQuote = true, note,
accountViewModel = accountViewModel, innerQuote = true,
navController = navController accountViewModel = accountViewModel,
) navController = navController
)
} }
} }
} }