mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: connections ui and unmessageable logic (#2016)
This commit is contained in:
parent
b7f5ba78b7
commit
3216559035
4 changed files with 39 additions and 13 deletions
|
|
@ -63,19 +63,19 @@ fun NodeChip(
|
|||
),
|
||||
label = {
|
||||
Text(
|
||||
modifier = Modifier.Companion
|
||||
modifier = Modifier
|
||||
.fillMaxWidth(),
|
||||
text = node.user.shortName.ifEmpty { "???" },
|
||||
fontSize = MaterialTheme.typography.labelLarge.fontSize,
|
||||
textDecoration = TextDecoration.Companion.LineThrough.takeIf { isIgnored },
|
||||
textAlign = TextAlign.Companion.Center,
|
||||
textDecoration = TextDecoration.LineThrough.takeIf { isIgnored },
|
||||
textAlign = TextAlign.Center,
|
||||
)
|
||||
},
|
||||
onClick = {},
|
||||
interactionSource = inputChipInteractionSource,
|
||||
)
|
||||
Box(
|
||||
modifier = Modifier.Companion
|
||||
modifier = Modifier
|
||||
.matchParentSize()
|
||||
.combinedClickable(
|
||||
onClick = { onAction(NodeMenuAction.MoreDetails(node)) },
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ import com.geeksville.mesh.ConfigProtos.Config.DeviceConfig
|
|||
import com.geeksville.mesh.ConfigProtos.Config.DisplayConfig
|
||||
import com.geeksville.mesh.MeshProtos
|
||||
import com.geeksville.mesh.R
|
||||
import com.geeksville.mesh.model.DeviceVersion
|
||||
import com.geeksville.mesh.model.Node
|
||||
import com.geeksville.mesh.model.isUnmessageableRole
|
||||
import com.geeksville.mesh.ui.common.components.BatteryInfo
|
||||
|
|
@ -101,11 +100,7 @@ fun NodeItem(
|
|||
val unmessageable = remember(thatNode) {
|
||||
when {
|
||||
thatNode.user.hasIsUnmessagable() -> thatNode.user.isUnmessagable
|
||||
thatNode.user.role.isUnmessageableRole() ->
|
||||
thatNode.metadata?.firmwareVersion?.let {
|
||||
DeviceVersion(it) < DeviceVersion("2.6.8")
|
||||
} ?: true
|
||||
else -> false
|
||||
else -> thatNode.user.role.isUnmessageableRole()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue