gatherer/trends: fix TrendAnalyzer

This commit is contained in:
Astro 2022-11-09 19:51:59 +01:00
parent d42615b44e
commit db23cbf314

View File

@ -86,7 +86,8 @@ impl TrendAnalyzer {
pub fn process_tag(&mut self, name: &Arc<String>, tag: &Arc<TrendTag>) {
let score = tag.score(self.period, self.until);
if self.score_threshold.map_or(false, |score_threshold| score < score_threshold) {
if self.result.len() >= self.size &&
self.score_threshold.map_or(false, |score_threshold| score < score_threshold) {
// score is below self.result[..self.size].score
return;
}