From 42927275f64115fc7c115afb8459c103cc35a502 Mon Sep 17 00:00:00 2001 From: SomnusVeritas Date: Sat, 21 Oct 2023 02:24:22 +0200 Subject: [PATCH] fixed bug in leaderboard that caused it to be ordered incorrectly --- lib/services/db_helper.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/services/db_helper.dart b/lib/services/db_helper.dart index c9d0dc5..d794d15 100644 --- a/lib/services/db_helper.dart +++ b/lib/services/db_helper.dart @@ -107,6 +107,7 @@ class DbHelper { static Stream>> get feedStream => _supabase.from('feed').stream(primaryKey: ['timestamp']); - static Stream>> get profilesStream => - _supabase.from('profiles').stream(primaryKey: ['id']); + static Stream>> get profilesStream => _supabase + .from('profiles') + .stream(primaryKey: ['id']).order('points', ascending: false); }