|
|
|
|
@ -53,6 +53,7 @@ import androidx.compose.ui.text.AnnotatedString
|
|
|
|
|
import androidx.compose.ui.text.input.TextFieldValue |
|
|
|
|
import androidx.compose.ui.text.font.FontWeight |
|
|
|
|
import androidx.compose.ui.text.style.TextOverflow |
|
|
|
|
import androidx.compose.ui.text.style.TextDecoration |
|
|
|
|
import androidx.compose.ui.unit.dp |
|
|
|
|
import androidx.compose.ui.unit.sp |
|
|
|
|
import com.utun.chat.data.Message |
|
|
|
|
@ -161,8 +162,13 @@ fun MessageBubble(message: Message, playbackState: ChatViewModel.PlaybackState =
|
|
|
|
|
when { |
|
|
|
|
message.inviteGroupName != null -> { |
|
|
|
|
val clipboard = LocalClipboardManager.current |
|
|
|
|
LaunchedEffect(message.id, message.inviteGroupName) { |
|
|
|
|
LogManager.addLog("DEBUG", "PM", "invitation rendered: seq=${message.id} " + |
|
|
|
|
"group_name_bytes=${message.inviteGroupName.toByteArray().size} link_bytes=${message.text.length}") |
|
|
|
|
} |
|
|
|
|
Text(stringResource(R.string.group_invitation, message.inviteGroupName), fontSize = 17.sp, color = textColor) |
|
|
|
|
Text(message.text, fontSize = 17.sp, color = Color(0xFF3390EC), maxLines = 1, overflow = TextOverflow.Ellipsis, |
|
|
|
|
Text(message.text, fontSize = 17.sp, color = Color(0xFF3390EC), textDecoration = TextDecoration.Underline, |
|
|
|
|
maxLines = 1, overflow = TextOverflow.Ellipsis, |
|
|
|
|
modifier = Modifier.fillMaxWidth().combinedClickable( |
|
|
|
|
onClick = { onInviteLink(message.text) }, |
|
|
|
|
onLongClickLabel = stringResource(R.string.copy_link), |
|
|
|
|
|