kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
feat: Add a bit more info to the node marker popup (#1691)
rodzic
08c69f3cf2
commit
373cfe7838
|
@ -324,8 +324,13 @@ fun MapView(
|
||||||
label = "${u.shortName} ${formatAgo(p.time)}"
|
label = "${u.shortName} ${formatAgo(p.time)}"
|
||||||
).apply {
|
).apply {
|
||||||
id = u.id
|
id = u.id
|
||||||
title = "${u.longName} ${node.batteryStr}"
|
title = u.longName
|
||||||
snippet = node.gpsString(gpsFormat)
|
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 ->
|
ourNode?.distanceStr(node, displayUnits)?.let { dist ->
|
||||||
subDescription =
|
subDescription =
|
||||||
context.getString(R.string.map_subDescription, ourNode.bearing(node), dist)
|
context.getString(R.string.map_subDescription, ourNode.bearing(node), dist)
|
||||||
|
|
|
@ -344,4 +344,5 @@
|
||||||
<string name="baro_pressure">Barometric Pressure</string>
|
<string name="baro_pressure">Barometric Pressure</string>
|
||||||
<string name="mesh_via_udp_enabled">Mesh via UDP enabled</string>
|
<string name="mesh_via_udp_enabled">Mesh via UDP enabled</string>
|
||||||
<string name="udp_config">UDP Config</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>
|
</resources>
|
||||||
|
|
Ładowanie…
Reference in New Issue