Files
Eventify-frontend/lib/features/gamification/providers
Sicherhaven c7e66756f9 fix: leaderboard empty on first open — decouple from loadAll()
LeaderboardScreen called loadAll() which uses Future.wait across 4 APIs.
If getDashboard() fails (empty user_id before auth), the entire batch
throws and leaderboard stays []. Switching districts worked because
setDistrict() calls getLeaderboard() directly.

- Add loadLeaderboard() to GamificationProvider — calls only getLeaderboard(),
  independent of dashboard/shop/achievements
- Add isLeaderboardLoading field with correct lifecycle in setDistrict/setTimePeriod
- LeaderboardScreen.initState now calls loadLeaderboard() instead of loadAll()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 00:13:56 +05:30
..