Removes unecessary parameters in the UserDisplay function
This commit is contained in:
@@ -1100,7 +1100,7 @@ fun FowardZapTo(
|
|||||||
Spacer(modifier = DoubleHorzSpacer)
|
Spacer(modifier = DoubleHorzSpacer)
|
||||||
|
|
||||||
Column(modifier = Modifier.weight(1f)) {
|
Column(modifier = Modifier.weight(1f)) {
|
||||||
UsernameDisplay(splitItem.key, showPlayButton = false)
|
UsernameDisplay(splitItem.key)
|
||||||
Text(
|
Text(
|
||||||
text = String.format("%.0f%%", splitItem.percentage * 100),
|
text = String.format("%.0f%%", splitItem.percentage * 100),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
|||||||
@@ -49,11 +49,10 @@ import com.vitorpamplona.quartz.events.ImmutableListOfLists
|
|||||||
fun NoteUsernameDisplay(
|
fun NoteUsernameDisplay(
|
||||||
baseNote: Note,
|
baseNote: Note,
|
||||||
weight: Modifier = Modifier,
|
weight: Modifier = Modifier,
|
||||||
showPlayButton: Boolean = true,
|
|
||||||
textColor: Color = Color.Unspecified,
|
textColor: Color = Color.Unspecified,
|
||||||
) {
|
) {
|
||||||
WatchAuthor(baseNote) {
|
WatchAuthor(baseNote) {
|
||||||
UsernameDisplay(it, weight, showPlayButton, textColor = textColor)
|
UsernameDisplay(it, weight, textColor = textColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,7 +95,6 @@ fun WatchAuthorWithBlank(
|
|||||||
fun UsernameDisplay(
|
fun UsernameDisplay(
|
||||||
baseUser: User,
|
baseUser: User,
|
||||||
weight: Modifier = Modifier,
|
weight: Modifier = Modifier,
|
||||||
showPlayButton: Boolean = true,
|
|
||||||
fontWeight: FontWeight = FontWeight.Bold,
|
fontWeight: FontWeight = FontWeight.Bold,
|
||||||
textColor: Color = Color.Unspecified,
|
textColor: Color = Color.Unspecified,
|
||||||
) {
|
) {
|
||||||
@@ -105,7 +103,7 @@ fun UsernameDisplay(
|
|||||||
Crossfade(targetState = userMetadata, modifier = weight, label = "UsernameDisplay") {
|
Crossfade(targetState = userMetadata, modifier = weight, label = "UsernameDisplay") {
|
||||||
val name = it?.bestName()
|
val name = it?.bestName()
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
UserDisplay(name, it.tags, weight, showPlayButton, fontWeight, textColor)
|
UserDisplay(name, it.tags, weight, fontWeight, textColor)
|
||||||
} else {
|
} else {
|
||||||
NPubDisplay(baseUser, weight, fontWeight, textColor)
|
NPubDisplay(baseUser, weight, fontWeight, textColor)
|
||||||
}
|
}
|
||||||
@@ -134,7 +132,6 @@ private fun UserDisplay(
|
|||||||
bestDisplayName: String,
|
bestDisplayName: String,
|
||||||
tags: ImmutableListOfLists<String>?,
|
tags: ImmutableListOfLists<String>?,
|
||||||
modifier: Modifier,
|
modifier: Modifier,
|
||||||
showPlayButton: Boolean = true,
|
|
||||||
fontWeight: FontWeight = FontWeight.Bold,
|
fontWeight: FontWeight = FontWeight.Bold,
|
||||||
textColor: Color = Color.Unspecified,
|
textColor: Color = Color.Unspecified,
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ fun PayViaIntentDialog(
|
|||||||
|
|
||||||
Column(modifier = Modifier.weight(1f)) {
|
Column(modifier = Modifier.weight(1f)) {
|
||||||
if (it.user != null) {
|
if (it.user != null) {
|
||||||
UsernameDisplay(it.user, showPlayButton = false)
|
UsernameDisplay(it.user)
|
||||||
} else {
|
} else {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.wallet_number, index + 1),
|
text = stringResource(id = R.string.wallet_number, index + 1),
|
||||||
|
|||||||
Reference in New Issue
Block a user