Fixes long lists of vanish request relays
This commit is contained in:
+9
-3
@@ -382,7 +382,7 @@ fun RequestToVanishScreen(
|
|||||||
if (showConfirmDialog) {
|
if (showConfirmDialog) {
|
||||||
ConfirmVanishDialog(
|
ConfirmVanishDialog(
|
||||||
isAllRelays = allRelaysSelected,
|
isAllRelays = allRelaysSelected,
|
||||||
relayUrls = selectedRelayUrls,
|
relays = selectedRelayUrls,
|
||||||
onConfirm = {
|
onConfirm = {
|
||||||
showConfirmDialog = false
|
showConfirmDialog = false
|
||||||
if (allRelaysSelected) {
|
if (allRelaysSelected) {
|
||||||
@@ -406,7 +406,7 @@ fun RequestToVanishScreen(
|
|||||||
@Composable
|
@Composable
|
||||||
private fun ConfirmVanishDialog(
|
private fun ConfirmVanishDialog(
|
||||||
isAllRelays: Boolean,
|
isAllRelays: Boolean,
|
||||||
relayUrls: List<NormalizedRelayUrl>,
|
relays: List<NormalizedRelayUrl>,
|
||||||
onConfirm: () -> Unit,
|
onConfirm: () -> Unit,
|
||||||
onDismiss: () -> Unit,
|
onDismiss: () -> Unit,
|
||||||
) {
|
) {
|
||||||
@@ -432,7 +432,13 @@ private fun ConfirmVanishDialog(
|
|||||||
if (isAllRelays) {
|
if (isAllRelays) {
|
||||||
stringRes(R.string.vanish_confirm_all_relays)
|
stringRes(R.string.vanish_confirm_all_relays)
|
||||||
} else {
|
} else {
|
||||||
stringRes(R.string.vanish_confirm_single_relay, relayUrls.joinToString(", ") { it.displayUrl() })
|
val relayNames =
|
||||||
|
relays.joinToString(
|
||||||
|
", ",
|
||||||
|
limit = 10,
|
||||||
|
transform = { it.displayUrl() },
|
||||||
|
)
|
||||||
|
stringRes(R.string.vanish_confirm_single_relay, relayNames)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user