Skip to content

Commit b8ffcfb

Browse files
authored
chore(chat): make message bubbles selectable (copy) (#917)
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent d22e6cb commit b8ffcfb

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

  • apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/components

apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/components/MessageBubble.kt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
1212
import androidx.compose.foundation.layout.padding
1313
import androidx.compose.foundation.layout.widthIn
1414
import androidx.compose.foundation.shape.RoundedCornerShape
15+
import androidx.compose.foundation.text.selection.SelectionContainer
1516
import androidx.compose.material3.Text
1617
import androidx.compose.runtime.Composable
1718
import androidx.compose.runtime.CompositionLocalProvider
@@ -84,11 +85,13 @@ private fun TextBubble(
8485
maxWidth: Dp,
8586
) {
8687
Bubble(isFromSelf, position, maxWidth) {
87-
Text(
88-
text = text,
89-
style = CodeTheme.typography.textSmall,
90-
color = CodeTheme.colors.textMain,
91-
)
88+
SelectionContainer {
89+
Text(
90+
text = text,
91+
style = CodeTheme.typography.textSmall,
92+
color = CodeTheme.colors.textMain,
93+
)
94+
}
9295
}
9396
}
9497

0 commit comments

Comments
 (0)