mozilla-magnet / magnet-client

A nearby content discovery client for Android & iOS
Mozilla Public License 2.0
17 stars 10 forks source link

Settings - Sort by distance does not work for virtual beacons #367

Open isabelrios opened 7 years ago

isabelrios commented 7 years ago

Steps Turn on Sort by distance settings Fake position 1 Open the app with POI1, POI2 Fake position to a different position 2 with POI3

Actual The list view shows PO1, PO2 and POI3 in that order

Expected POI3 should be the first one in the list after changing the position

wilsonpage commented 7 years ago

@gmarty perhaps we should be calculating distance for virtual beacons before they are used in any view so that we can show distance and sort in list view.

gmarty commented 7 years ago

The calculation must still be done in JavaScript-land and via React so they get updated whenever the user location changes. I guess the fix is to do computation in the ListView component too.

oteo commented 7 years ago

If this is not working, I think we should not show this setting in the Release builds as we did with with "Show distance" setting. What do you think @wilsonpage @arcturus ?