Browse Source

sort high scores

pull/8/head
Tim Glasgow 2 years ago
parent
commit
200d044f8e
  1. 2
      squarenotsquare/src/realm/repos/ScoreRepo.js

2
squarenotsquare/src/realm/repos/ScoreRepo.js

@ -26,7 +26,7 @@ export default class ScoreRepo {
}; };
getHighScores = () => { getHighScores = () => {
let score = this.realmDB.objects(ScoreEntity.name); let score = this.realmDB.objects(ScoreEntity.name).sorted('value', true);
let highScores = []; let highScores = [];
score.forEach((row) => { score.forEach((row) => {
highScores.push({user: row.user, value: row.value}); highScores.push({user: row.user, value: row.value});

Loading…
Cancel
Save