mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Add role to NodeInfo (#1174)
This commit is contained in:
parent
8afa5f9313
commit
2109426243
4 changed files with 540 additions and 2 deletions
|
|
@ -52,6 +52,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
|||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.geeksville.mesh.ConfigProtos
|
||||
import com.geeksville.mesh.ConfigProtos.Config.DeviceConfig
|
||||
import com.geeksville.mesh.MeshProtos
|
||||
import com.geeksville.mesh.NodeInfo
|
||||
import com.geeksville.mesh.R
|
||||
|
|
@ -252,6 +253,13 @@ fun NodeInfo(
|
|||
style = style,
|
||||
)
|
||||
}
|
||||
val role = thatNodeInfo.user?.role
|
||||
role?.let {
|
||||
Text(
|
||||
text = DeviceConfig.Role.forNumber(it).name,
|
||||
fontSize = MaterialTheme.typography.button.fontSize
|
||||
)
|
||||
}
|
||||
val nodeId = thatNodeInfo.user?.id
|
||||
if (nodeId != null) {
|
||||
Text(text = nodeId, fontSize = MaterialTheme.typography.button.fontSize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue