From a926af4c1fb155d60a55778cb5a4e51956242987 Mon Sep 17 00:00:00 2001 From: Alexander Karkossa Date: Tue, 20 Sep 2022 01:06:18 +0200 Subject: [PATCH] style: fix ktlint --- html-text/src/main/java/de/charlex/compose/HtmlText.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html-text/src/main/java/de/charlex/compose/HtmlText.kt b/html-text/src/main/java/de/charlex/compose/HtmlText.kt index 422bac0..2853e31 100644 --- a/html-text/src/main/java/de/charlex/compose/HtmlText.kt +++ b/html-text/src/main/java/de/charlex/compose/HtmlText.kt @@ -76,13 +76,13 @@ fun HtmlText( ) { val context = LocalContext.current val annotatedString = context.resources.getText(textId).toAnnotatedString(urlSpanStyle, colorMapping) - val clickable = annotatedString.getStringAnnotations(0, annotatedString.length-1).any { it.tag == "url" } + val clickable = annotatedString.getStringAnnotations(0, annotatedString.length - 1).any { it.tag == "url" } val uriHandler = LocalUriHandler.current val layoutResult = remember { mutableStateOf(null) } Text( - modifier = modifier.then(if(clickable) Modifier.pointerInput(Unit) { + modifier = modifier.then(if (clickable) Modifier.pointerInput(Unit) { detectTapGestures(onTap = { pos -> layoutResult.value?.let { layoutResult -> val position = layoutResult.getOffsetForPosition(pos) @@ -165,13 +165,13 @@ fun HtmlText( Html.fromHtml(text, Html.FROM_HTML_MODE_LEGACY) }.toAnnotatedString(urlSpanStyle, colorMapping) - val clickable = annotatedString.getStringAnnotations(0, annotatedString.length-1).any { it.tag == "url" } + val clickable = annotatedString.getStringAnnotations(0, annotatedString.length - 1).any { it.tag == "url" } val uriHandler = LocalUriHandler.current val layoutResult = remember { mutableStateOf(null) } Text( - modifier = modifier.then(if(clickable) Modifier.pointerInput(Unit) { + modifier = modifier.then(if (clickable) Modifier.pointerInput(Unit) { detectTapGestures(onTap = { pos -> layoutResult.value?.let { layoutResult -> val position = layoutResult.getOffsetForPosition(pos)