mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Added relays count (#3773)
Signed-off-by: Benjamin Faershtein <119711889+RCGV1@users.noreply.github.com> Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
0d00c838b0
commit
022652efe5
8 changed files with 18 additions and 3 deletions
|
|
@ -30,18 +30,21 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.compose.resources.StringResource
|
||||
import org.jetbrains.compose.resources.pluralStringResource
|
||||
import org.jetbrains.compose.resources.stringResource
|
||||
import org.meshtastic.core.strings.Res
|
||||
import org.meshtastic.core.strings.close
|
||||
import org.meshtastic.core.strings.relayed_by
|
||||
import org.meshtastic.core.strings.relays
|
||||
import org.meshtastic.core.strings.resend
|
||||
|
||||
@Suppress("UnusedParameter")
|
||||
@Composable
|
||||
fun DeliveryInfo(
|
||||
title: StringResource,
|
||||
resendOption: Boolean,
|
||||
text: StringResource? = null,
|
||||
relayNodeName: String? = null,
|
||||
relays: Int = 0,
|
||||
onConfirm: (() -> Unit) = {},
|
||||
onDismiss: () -> Unit = {},
|
||||
) = AlertDialog(
|
||||
|
|
@ -75,9 +78,9 @@ fun DeliveryInfo(
|
|||
style = MaterialTheme.typography.bodyMedium,
|
||||
)
|
||||
}
|
||||
relayNodeName?.let {
|
||||
if (relays != 0) {
|
||||
Text(
|
||||
text = stringResource(Res.string.relayed_by, it),
|
||||
text = pluralStringResource(Res.plurals.relays, relays, relays),
|
||||
modifier = Modifier.padding(top = 8.dp),
|
||||
textAlign = TextAlign.Center,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
|
|
|
|||
|
|
@ -397,6 +397,7 @@ internal fun MessageStatusDialog(
|
|||
resendOption = resendOption,
|
||||
text = text,
|
||||
relayNodeName = relayNodeName,
|
||||
relays = message.relays,
|
||||
onConfirm = onResend,
|
||||
onDismiss = onDismiss,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue