mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-26 17:52:29 +01:00
show only 3 users in the recommended relays section
This commit is contained in:
parent
4c6842faf4
commit
7a86d78c50
@ -40,8 +40,10 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.service.Nip11CachedRetriever
|
||||
import com.vitorpamplona.amethyst.ui.note.AddRelayButton
|
||||
import com.vitorpamplona.amethyst.ui.note.RenderRelayIcon
|
||||
@ -65,7 +67,11 @@ fun Kind3RelaySetupInfoProposalRow(
|
||||
accountViewModel: AccountViewModel,
|
||||
nav: (String) -> Unit,
|
||||
) {
|
||||
Column(Modifier.fillMaxWidth().clickable(onClick = onClick)) {
|
||||
Column(
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.clickable(onClick = onClick),
|
||||
) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.padding(vertical = 5.dp),
|
||||
@ -107,7 +113,7 @@ fun Kind3RelaySetupInfoProposalRow(
|
||||
}
|
||||
|
||||
FlowRow(verticalArrangement = Arrangement.Center) {
|
||||
item.users.forEach {
|
||||
item.users.take(3).forEach {
|
||||
UserPicture(
|
||||
userHex = it,
|
||||
size = Size25dp,
|
||||
@ -115,6 +121,11 @@ fun Kind3RelaySetupInfoProposalRow(
|
||||
nav = nav,
|
||||
)
|
||||
}
|
||||
if (item.users.size > 3) {
|
||||
Text(
|
||||
text = stringResource(R.string.and_more),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -951,4 +951,5 @@
|
||||
<string name="add_a_nip96_server">Add a NIP-96 Server</string>
|
||||
<string name="delete_all">Delete all</string>
|
||||
<string name="delete_all_drafts_confirmation">Are you sure you want to delete all drafts?</string>
|
||||
<string name="and_more">" ... and more"</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user