This PR aims to bring real user data from the database into the view of the leaderboard/ranking page.
Waiting on #319 and #322 to be merged before integration of viewmodel inside view.
Acceptance criteria
[x] Retrieve users that have most points from DB
[x] Create new UI model class to expose user ranking fields
[x] Write a viewmodel with public API to get the top x (50) users of the app
[x] Write another function to get the current user (potentially with its own UI model class)
[X] Integrate the viewmodel with the view of #322
[X] Being able to refresh the leaderboard using pull down on the list
Result
We now have a real leaderboard directly inside the application, which gets populated with real data from the database.
On top of that, we also have a bottom element with our own score and position.
The viewmodel is unit tested in depth and the UI is checked for correctness too.
Fixes #299
Ranking/Leaderboard ViewModel
This PR aims to bring real user data from the database into the view of the leaderboard/ranking page.
Waiting on #319 and #322 to be merged before integration of viewmodel inside view.
Acceptance criteria
x
(50) users of the appResult
We now have a real leaderboard directly inside the application, which gets populated with real data from the database.
On top of that, we also have a bottom element with our own score and position.
The viewmodel is unit tested in depth and the UI is checked for correctness too.
Note: first relevant commit is 0b29bab.