Skip to content

Commit bb56f61

Browse files
committed
Fix URL annotation click type inference
1 parent e5019a7 commit bb56f61

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎app/src/main/java/com/example/ui/MainScreen.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,9 +1209,9 @@ private fun ChatBubble(
12091209
),
12101210
lineHeight = 23.sp,
12111211
modifier = Modifier.fillMaxWidth(),
1212-
onClick = { offset ->
1212+
onClick = { offset: Int ->
12131213
linkedText.getStringAnnotations("URL", offset, offset)
1214-
.firstOrNull()?.let { annotation ->
1214+
.firstOrNull()?.let { annotation: androidx.compose.ui.text.AnnotatedString.Range<String> ->
12151215
runCatching {
12161216
context.startActivity(
12171217
Intent(Intent.ACTION_VIEW, Uri.parse(annotation.item))

0 commit comments

Comments
 (0)