feat: add hops_away sort option

This commit is contained in:
andrekir 2024-06-03 08:57:29 -03:00
parent 4ceb4c5199
commit 88a6bcc09d
3 changed files with 3 additions and 0 deletions

View file

@ -58,6 +58,7 @@ interface NodeInfoDao {
(position_longitude - (SELECT position_longitude FROM OurNode)) *
(position_longitude - (SELECT position_longitude FROM OurNode))
END
WHEN :sort = 'hops_away' THEN hopsAway
WHEN :sort = 'channel' THEN channel
WHEN :sort = 'via_mqtt' THEN user_longName LIKE '%(MQTT)' -- viaMqtt
ELSE 0

View file

@ -7,6 +7,7 @@ enum class NodeSortOption(val sqlValue: String, @StringRes val stringRes: Int) {
LAST_HEARD("last_heard", R.string.node_sort_last_heard),
ALPHABETICAL("alpha", R.string.node_sort_alpha),
DISTANCE("distance", R.string.node_sort_distance),
HOPS_AWAY("hops_away", R.string.node_sort_hops_away),
CHANNEL("channel", R.string.node_sort_channel),
VIA_MQTT("via_mqtt", R.string.node_sort_via_mqtt),
}