mk-5 / gdx-fireapp

libGDX Firebase API
Apache License 2.0
65 stars 21 forks source link

Can't seem to use OrderByChild to order results #41

Closed tiagoalexs closed 3 years ago

tiagoalexs commented 3 years ago

Describe the bug Hello, i've been trying for the past couple of hours to try and add a leaderboard system to my university project, but i can't seem to order the results by the user score.

The "highScore" variables are stored as doubles and returned through the method below as Long variables.

studio64_Tl7VKoONRk

I tried using only List instead of List < User > and the result is the same.

studio64_VhoSYhoJkF

chrome_yK0fV5K3R5

Screenshot_2020-08-24-03-12-06-447_com mygdx endlessrunner

The results should appear either in ascending or descending order for both leaderboards Don't really know what i'm missing here

Platform (please check one of the following):

mk-5 commented 3 years ago

Hi @tiagoalexs

I need to check, I will let you know!

mk-5 commented 3 years ago

@tiagoalexs fix will be ready soon. Please look forward to a new version

https://github.com/mk-5/gdx-fireapp/pull/42

mk-5 commented 3 years ago

Hi @tiagoalexs

can you grab&check the latest version 2.1.8? I've added e2e test for a case like your case https://github.com/mk-5/gdx-fireapp/blob/master/e2e/core/src/pl/mk5/gdx/fireapp/e2e/tests/DatabaseOrderByChildTest.java and it works.

I hope that fix will work for you as well -> if no, please let me know.

tiagoalexs commented 3 years ago

Hi @mk-5 I've been testing it out and everything seems to be working alright. Thanks for the fix!

mk-5 commented 3 years ago

cool 👍