feat: Add a bit more info to the node marker popup (#1691)

This commit is contained in:
Ken Piper 2025-03-19 10:02:58 -05:00 committed by GitHub
parent 08c69f3cf2
commit 373cfe7838
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -324,8 +324,13 @@ fun MapView(
label = "${u.shortName} ${formatAgo(p.time)}"
).apply {
id = u.id
title = "${u.longName} ${node.batteryStr}"
snippet = node.gpsString(gpsFormat)
title = u.longName
snippet = context.getString(R.string.map_node_popup_details,
node.gpsString(gpsFormat),
formatAgo(node.lastHeard),
formatAgo(p.time),
if (node.batteryStr != "") node.batteryStr else "?"
)
ourNode?.distanceStr(node, displayUnits)?.let { dist ->
subDescription =
context.getString(R.string.map_subDescription, ourNode.bearing(node), dist)

View file

@ -344,4 +344,5 @@
<string name="baro_pressure">Barometric Pressure</string>
<string name="mesh_via_udp_enabled">Mesh via UDP enabled</string>
<string name="udp_config">UDP Config</string>
<string name="map_node_popup_details"><![CDATA[%s<br>Last heard: %s<br>Last position: %s<br>Battery: %s]]></string>
</resources>