mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Sort nodes with unknown hops last (#1302)
Nodes with -1 hops (unknown) are now sorted last when sorting by hops_away. This ensures a more intuitive ordering in the UI.
This commit is contained in:
parent
9bd84d3fc0
commit
cf2315cb66
1 changed files with 5 additions and 1 deletions
|
|
@ -63,7 +63,11 @@ interface NodeInfoDao {
|
|||
(longitude - (SELECT longitude FROM OurNode)) *
|
||||
(longitude - (SELECT longitude FROM OurNode))
|
||||
END
|
||||
WHEN :sort = 'hops_away' THEN hops_away
|
||||
WHEN :sort = 'hops_away' THEN
|
||||
CASE
|
||||
WHEN hops_away = -1 THEN 999999999
|
||||
ELSE hops_away
|
||||
END
|
||||
WHEN :sort = 'channel' THEN channel
|
||||
WHEN :sort = 'via_mqtt' THEN long_name LIKE '%(MQTT)' -- viaMqtt
|
||||
ELSE 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue