]> git.sesse.net Git - ccbs/blobdiff - bigscreen/top5chosenscreen.cpp
Make backgrounded invalidated screens less database-noisy.
[ccbs] / bigscreen / top5chosenscreen.cpp
index 13cc0b911aeb69029fb816b9642b6fb98ee3ff72..702b24fdab551d5e2e8665abfde40c65b8b1f0d4 100644 (file)
@@ -25,6 +25,7 @@ bool Top5ChosenScreen::check_invalidated()
                return true;
        if (!scores_changed.get_flag())
                return false;
+       scores_changed.reset_flag();
 
        // check that there are indeed changes, otherwise don't bother
        std::vector<TopChosen> scores;
@@ -32,6 +33,7 @@ bool Top5ChosenScreen::check_invalidated()
 
        for (std::vector<TopChosen>::const_iterator i = scores.begin(); i != scores.end(); ++i) {
                if (seen_topchosen.count(*i) == 0) {
+                       valid = false;
                        return true;
                }       
        }