From 6c2514e69b8845c04a159ca2cfc18b9816d86947 Mon Sep 17 00:00:00 2001 From: DatScreamer Date: Sat, 15 Aug 2026 13:14:26 -0600 Subject: [PATCH] android: only attach link handling to titles that contain links Session titles are rendered through LinkifiedText, which uses ClickableText to open web links. ClickableText consumes taps across the whole span to detect link hits, so a session row's combinedClickable only fired on the leftmost status-dot region and the rest of the row did nothing. Fall back to a plain Text when the title has no URLs so taps pass through to the row's click handler. --- .../com/litter/android/ui/common/FormattedText.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/android/app/src/main/java/com/litter/android/ui/common/FormattedText.kt b/apps/android/app/src/main/java/com/litter/android/ui/common/FormattedText.kt index 18a66aaf3..ee82c11e4 100644 --- a/apps/android/app/src/main/java/com/litter/android/ui/common/FormattedText.kt +++ b/apps/android/app/src/main/java/com/litter/android/ui/common/FormattedText.kt @@ -131,6 +131,21 @@ private fun LinkifiedText( val annotated = remember(text, linkColor) { linkifiedAnnotatedString(text, linkColor) } + val hasLinks = WebLinkRegex.containsMatchIn(text) + // Only attach link tap handling when the text actually contains links. + // ClickableText consumes taps across the whole span to detect link hits, + // which would otherwise swallow the parent row's click when a session + // title has no links at all. + if (!hasLinks) { + Text( + text = annotated, + style = TextStyle(color = color, fontSize = fontSize), + maxLines = maxLines, + overflow = TextOverflow.Ellipsis, + modifier = modifier, + ) + return + } ClickableText( text = annotated, style = TextStyle(color = color, fontSize = fontSize),