mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: simplify ourNodeInfo logic
This commit is contained in:
parent
f00ad4159d
commit
bc85822133
1 changed files with 3 additions and 3 deletions
|
|
@ -228,8 +228,8 @@ class UsersFragment : ScreenFragment("Users"), Logging {
|
|||
holder.coordsView.visibility = View.INVISIBLE
|
||||
}
|
||||
|
||||
val ourNodeInfo = model.ourNodeInfo.value
|
||||
val distance = ourNodeInfo?.distanceStr(n, displayUnits)
|
||||
val ourNodeInfo = nodes[0]
|
||||
val distance = ourNodeInfo.distanceStr(n, displayUnits)
|
||||
if (distance != null) {
|
||||
holder.distanceView.text = distance
|
||||
holder.distanceView.visibility = View.VISIBLE
|
||||
|
|
@ -248,7 +248,7 @@ class UsersFragment : ScreenFragment("Users"), Logging {
|
|||
holder.envMetrics.visibility = View.GONE
|
||||
}
|
||||
|
||||
if (n.num == ourNodeInfo?.num) {
|
||||
if (n.num == ourNodeInfo.num) {
|
||||
val text = "ChUtil %.1f%% AirUtilTX %.1f%%".format(
|
||||
n.deviceMetrics?.channelUtilization,
|
||||
n.deviceMetrics?.airUtilTx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue