mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 08:57:35 +02:00
Fixes replying information
This commit is contained in:
@@ -41,7 +41,9 @@ fun ReplyInformation(replyTo: MutableList<Note>?, mentions: List<User>?, prefix:
|
|||||||
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
||||||
)
|
)
|
||||||
|
|
||||||
mentions.toSet().forEachIndexed { idx, user ->
|
val mentionSet = mentions.toSet()
|
||||||
|
|
||||||
|
mentionSet.toSet().forEachIndexed { idx, user ->
|
||||||
val innerUserState by user.live.observeAsState()
|
val innerUserState by user.live.observeAsState()
|
||||||
val innerUser = innerUserState?.user
|
val innerUser = innerUserState?.user
|
||||||
|
|
||||||
@@ -52,13 +54,13 @@ fun ReplyInformation(replyTo: MutableList<Note>?, mentions: List<User>?, prefix:
|
|||||||
onClick = { onUserTagClick(myUser) }
|
onClick = { onUserTagClick(myUser) }
|
||||||
)
|
)
|
||||||
|
|
||||||
if (idx < mentions.size - 2) {
|
if (idx < mentionSet.size - 2) {
|
||||||
Text(
|
Text(
|
||||||
", ",
|
", ",
|
||||||
fontSize = 13.sp,
|
fontSize = 13.sp,
|
||||||
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
||||||
)
|
)
|
||||||
} else if (idx < mentions.size - 1) {
|
} else if (idx < mentionSet.size - 1) {
|
||||||
Text(
|
Text(
|
||||||
" and ",
|
" and ",
|
||||||
fontSize = 13.sp,
|
fontSize = 13.sp,
|
||||||
@@ -115,7 +117,9 @@ fun ReplyInformationChannel(replyTo: MutableList<Note>?,
|
|||||||
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
||||||
)
|
)
|
||||||
|
|
||||||
mentions.toSet().forEachIndexed { idx, user ->
|
val mentionSet = mentions.toSet()
|
||||||
|
|
||||||
|
mentionSet.forEachIndexed { idx, user ->
|
||||||
val innerUserState by user.live.observeAsState()
|
val innerUserState by user.live.observeAsState()
|
||||||
val innerUser = innerUserState?.user
|
val innerUser = innerUserState?.user
|
||||||
|
|
||||||
@@ -126,13 +130,13 @@ fun ReplyInformationChannel(replyTo: MutableList<Note>?,
|
|||||||
onClick = { onUserTagClick(myUser) }
|
onClick = { onUserTagClick(myUser) }
|
||||||
)
|
)
|
||||||
|
|
||||||
if (idx < mentions.size - 2) {
|
if (idx < mentionSet.size - 2) {
|
||||||
Text(
|
Text(
|
||||||
", ",
|
", ",
|
||||||
fontSize = 13.sp,
|
fontSize = 13.sp,
|
||||||
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
||||||
)
|
)
|
||||||
} else if (idx < mentions.size - 1) {
|
} else if (idx < mentionSet.size - 1) {
|
||||||
Text(
|
Text(
|
||||||
" and ",
|
" and ",
|
||||||
fontSize = 13.sp,
|
fontSize = 13.sp,
|
||||||
|
Reference in New Issue
Block a user