Skip to content

Commit

Permalink
Load text notification ahead of high scores in staging area backgroun…
Browse files Browse the repository at this point in the history
…d task.
  • Loading branch information
ebarlas committed Sep 3, 2024
1 parent 0b5c31f commit d2af95b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/net/StagingArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ void trippin::StagingArea::start() {
void trippin::StagingArea::run() {
SDL_Log("entering query scores loop");
while (true) {
auto n = transport.getNotification();
if (!n.empty()) {
notification = n;
SDL_Log("set notification in staging area");
}
auto top = transport.topScores();
if (top.ok) {
setTopScores(top.scores);
Expand All @@ -78,11 +83,6 @@ void trippin::StagingArea::run() {
setTodayScores(today.scores);
SDL_Log("set today scores in staging area, count=%lu", today.scores.size());
}
auto n = transport.getNotification();
if (!n.empty()) {
notification = n;
SDL_Log("set notification in staging area");
}
std::this_thread::sleep_for(std::chrono::minutes(1));
}
}

0 comments on commit d2af95b

Please sign in to comment.