coords position fix

This commit is contained in:
goga
2021-03-16 11:38:42 +05:00
parent 452bf6f6cb
commit 6958e3c86a
2 changed files with 4 additions and 3 deletions

View File

@@ -113,8 +113,9 @@ class UsersFragment : ScreenFragment("Users"), Logging {
val ourNodeInfo = model.nodeDB.ourNodeInfo
val pos = ourNodeInfo?.validPosition;
if (pos != null) {
val coords = String.format("%.5f %.5f", pos.latitude, pos.longitude).replace(",",".")
val html =
"<a href='geo:${pos.latitude},${pos.longitude}'>${pos.latitude.toString()} ${pos.longitude}</a>"
"<a href='geo:${pos.latitude},${pos.longitude}'>${coords}</a>"
holder.coordsView.text = HtmlCompat.fromHtml(html, Html.FROM_HTML_MODE_LEGACY)
holder.coordsView.movementMethod = LinkMovementMethod.getInstance()
holder.coordsView.visibility = View.VISIBLE