kopia lustrzana https://github.com/vitorpamplona/amethyst
Removes unecessary parameters in the UserDisplay function
rodzic
9ade18e1c1
commit
37fdb8b2aa
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
) {
|
||||
|
|
|
@ -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),
|
||||
|
|
Ładowanie…
Reference in New Issue