Removes unecessary parameters in the UserDisplay function

pull/819/head
Vitor Pamplona 2024-03-25 17:58:54 -04:00
rodzic 9ade18e1c1
commit 37fdb8b2aa
3 zmienionych plików z 4 dodań i 7 usunięć

Wyświetl plik

@ -1100,7 +1100,7 @@ fun FowardZapTo(
Spacer(modifier = DoubleHorzSpacer)
Column(modifier = Modifier.weight(1f)) {
UsernameDisplay(splitItem.key, showPlayButton = false)
UsernameDisplay(splitItem.key)
Text(
text = String.format("%.0f%%", splitItem.percentage * 100),
maxLines = 1,

Wyświetl plik

@ -49,11 +49,10 @@ import com.vitorpamplona.quartz.events.ImmutableListOfLists
fun NoteUsernameDisplay(
baseNote: Note,
weight: Modifier = Modifier,
showPlayButton: Boolean = true,
textColor: Color = Color.Unspecified,
) {
WatchAuthor(baseNote) {
UsernameDisplay(it, weight, showPlayButton, textColor = textColor)
UsernameDisplay(it, weight, textColor = textColor)
}
}
@ -96,7 +95,6 @@ fun WatchAuthorWithBlank(
fun UsernameDisplay(
baseUser: User,
weight: Modifier = Modifier,
showPlayButton: Boolean = true,
fontWeight: FontWeight = FontWeight.Bold,
textColor: Color = Color.Unspecified,
) {
@ -105,7 +103,7 @@ fun UsernameDisplay(
Crossfade(targetState = userMetadata, modifier = weight, label = "UsernameDisplay") {
val name = it?.bestName()
if (name != null) {
UserDisplay(name, it.tags, weight, showPlayButton, fontWeight, textColor)
UserDisplay(name, it.tags, weight, fontWeight, textColor)
} else {
NPubDisplay(baseUser, weight, fontWeight, textColor)
}
@ -134,7 +132,6 @@ private fun UserDisplay(
bestDisplayName: String,
tags: ImmutableListOfLists<String>?,
modifier: Modifier,
showPlayButton: Boolean = true,
fontWeight: FontWeight = FontWeight.Bold,
textColor: Color = Color.Unspecified,
) {

Wyświetl plik

@ -388,7 +388,7 @@ fun PayViaIntentDialog(
Column(modifier = Modifier.weight(1f)) {
if (it.user != null) {
UsernameDisplay(it.user, showPlayButton = false)
UsernameDisplay(it.user)
} else {
Text(
text = stringResource(id = R.string.wallet_number, index + 1),