mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
1df58b2cae
commit
0c2d58bb9c
1 changed files with 22 additions and 19 deletions
|
|
@ -102,26 +102,29 @@ fun ContactItem(
|
|||
colors = colors,
|
||||
)
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
|
||||
Text(text = longName, modifier = Modifier.weight(1f))
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
// Show unlock icon for broadcast with default PSK
|
||||
val isBroadcast =
|
||||
contact.contactKey.getOrNull(1) == '^' ||
|
||||
contact.contactKey.endsWith("^all") ||
|
||||
contact.contactKey.endsWith("^broadcast")
|
||||
if (isBroadcast && channels != null) {
|
||||
val channelIndex = contact.contactKey[0].digitToIntOrNull()
|
||||
channelIndex?.let { index -> SecurityIcon(channels, index) }
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
}
|
||||
Text(
|
||||
text = lastMessageTime.orEmpty(),
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
fontSize = MaterialTheme.typography.labelLarge.fontSize,
|
||||
modifier = Modifier.width(80.dp),
|
||||
)
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
// Show unlock icon for broadcast with default PSK
|
||||
val isBroadcast =
|
||||
contact.contactKey.getOrNull(1) == '^' ||
|
||||
contact.contactKey.endsWith("^all") ||
|
||||
contact.contactKey.endsWith("^broadcast")
|
||||
if (isBroadcast && channels != null) {
|
||||
val channelIndex = contact.contactKey[0].digitToIntOrNull()
|
||||
channelIndex?.let { index -> SecurityIcon(channels, index) }
|
||||
}
|
||||
|
||||
Text(text = longName)
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
Text(
|
||||
text = lastMessageTime.orEmpty(),
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
fontSize = MaterialTheme.typography.labelLarge.fontSize,
|
||||
modifier = Modifier.width(80.dp),
|
||||
)
|
||||
}
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(top = 8.dp),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue