Skip to content

Commit 89a1bfd

Browse files
committed
Instead of replacing suggested emojis, concatenate recent ones
1 parent bf72739 commit 89a1bfd

File tree

1 file changed

+2
-5
lines changed
  • features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist

1 file changed

+2
-5
lines changed

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ import io.element.android.libraries.matrix.ui.messages.sender.SenderNameMode
9898
import io.element.android.libraries.ui.strings.CommonStrings
9999
import kotlinx.collections.immutable.ImmutableList
100100
import kotlinx.collections.immutable.persistentListOf
101+
import kotlinx.collections.immutable.toImmutableList
101102

102103
@OptIn(ExperimentalMaterial3Api::class)
103104
@Composable
@@ -359,11 +360,7 @@ private fun EmojiReactionsRow(
359360
val backgroundColor = ElementTheme.colors.bgCanvasDefault
360361

361362
val emojis = remember(recentEmojis.isEmpty()) {
362-
if (recentEmojis.isEmpty()) {
363-
persistentListOf("👍️", "👎️", "🔥", "❤️", "👏")
364-
} else {
365-
recentEmojis.take(50)
366-
}
363+
(persistentListOf("👍️", "👎️", "🔥", "❤️", "👏") + recentEmojis.take(50)).toImmutableList()
367364
}
368365

369366
LazyRow(

0 commit comments

Comments
 (0)