From 200d044f8ed6ef6820b61aaeddee8e9a8dbfea71 Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Mon, 8 Aug 2022 17:14:48 -0500 Subject: [PATCH] sort high scores --- squarenotsquare/src/realm/repos/ScoreRepo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squarenotsquare/src/realm/repos/ScoreRepo.js b/squarenotsquare/src/realm/repos/ScoreRepo.js index 60fe8b6..e4a202e 100644 --- a/squarenotsquare/src/realm/repos/ScoreRepo.js +++ b/squarenotsquare/src/realm/repos/ScoreRepo.js @@ -26,7 +26,7 @@ export default class ScoreRepo { }; getHighScores = () => { - let score = this.realmDB.objects(ScoreEntity.name); + let score = this.realmDB.objects(ScoreEntity.name).sorted('value', true); let highScores = []; score.forEach((row) => { highScores.push({user: row.user, value: row.value});