No need for String.format
This commit is contained in:
+1
-2
@@ -51,7 +51,6 @@ import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer
|
|||||||
import com.vitorpamplona.amethyst.ui.theme.Size10dp
|
import com.vitorpamplona.amethyst.ui.theme.Size10dp
|
||||||
import com.vitorpamplona.amethyst.ui.theme.Size55dp
|
import com.vitorpamplona.amethyst.ui.theme.Size55dp
|
||||||
import com.vitorpamplona.amethyst.ui.theme.placeholderText
|
import com.vitorpamplona.amethyst.ui.theme.placeholderText
|
||||||
import java.util.Locale
|
|
||||||
import kotlin.math.round
|
import kotlin.math.round
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -103,7 +102,7 @@ fun ForwardZapTo(
|
|||||||
Column(modifier = Modifier.weight(1f)) {
|
Column(modifier = Modifier.weight(1f)) {
|
||||||
UsernameDisplay(splitItem.key, accountViewModel = accountViewModel)
|
UsernameDisplay(splitItem.key, accountViewModel = accountViewModel)
|
||||||
Text(
|
Text(
|
||||||
text = String.format(Locale.getDefault(), "%.0f%%", splitItem.percentage * 100),
|
text = "${(splitItem.percentage * 100).toInt()}%",
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
|
|||||||
Reference in New Issue
Block a user