Changing how unread counts are calculated. No more collisions between negatives and positives.

This commit is contained in:
Samuel Clay 2010-10-13 18:08:30 -04:00
parent 6e3a1c1d10
commit eb2c38c0b1

View file

@ -127,11 +127,11 @@ class UserSubscription(models.Model):
max_score = max(scores['feed'], scores['author'], scores['tags'], scores['title'])
min_score = min(scores['feed'], scores['author'], scores['tags'], scores['title'])
if max_score > 0:
if max_score > 0 and max_score >= abs(min_score):
feed_scores['positive'] += 1
if min_score < 0:
elif min_score < 0 and abs(min_score) >= max_score:
feed_scores['negative'] += 1
if max_score == 0 and min_score == 0:
elif max_score == 0 and min_score == 0:
feed_scores['neutral'] += 1
# if not silent: