Enable detekt rules UnnecessaryParentheses and cleanup the code.

This commit is contained in:
Benoit Marty 2023-07-20 18:05:37 +02:00
parent 2928073e22
commit c75eabbcb0
16 changed files with 27 additions and 23 deletions

View file

@ -65,7 +65,7 @@ fun TimelineItem.Event.toExtraPadding(): ExtraPadding {
fun ExtraPadding.getStr(fontSize: TextUnit): String {
if (nbChars == 0) return ""
val timestampFontSize = ElementTheme.typography.fontBodyXsRegular.fontSize // 11.sp
val nbOfSpaces = ((timestampFontSize.value / fontSize.value) * nbChars).toInt() + 1
val nbOfSpaces = (timestampFontSize.value / fontSize.value * nbChars).toInt() + 1
// A space and some unbreakable spaces
return " " + "\u00A0".repeat(nbOfSpaces)
}

View file

@ -351,7 +351,7 @@ private fun HtmlMxReply(
Surface(
modifier = modifier
.padding(bottom = 4.dp)
.offset(x = -(8.dp)),
.offset(x = (-8).dp),
color = MaterialTheme.colorScheme.background,
shape = shape,
) {