mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Changing how unreads are calculated. If all stories are red, that's OK for now. Prevents the weird situation when training a feed and everything switches colors at once (same author or something), and when the unreads cycle through red, then everything gets marked as read. Not the desired behavior. And who is this helping, anyhow?
This commit is contained in:
parent
0f9474c896
commit
691898e922
2 changed files with 5 additions and 7 deletions
|
@ -17,7 +17,7 @@ def index(requst):
|
|||
@json.json_view
|
||||
def save_classifier(request):
|
||||
post = request.POST
|
||||
logging.user(request.user, "~FGSaving classifier: ~FW%s" % (post))
|
||||
logging.user(request.user, "~FGSaving classifier: ~SB%s~SN ~FW%s" % (feed, post))
|
||||
feed_id = int(post['feed_id'])
|
||||
feed = get_object_or_404(Feed, pk=feed_id)
|
||||
code = 0
|
||||
|
@ -73,8 +73,6 @@ def save_classifier(request):
|
|||
_save_classifier(MClassifierTag, 'tag')
|
||||
_save_classifier(MClassifierTitle, 'title')
|
||||
_save_classifier(MClassifierFeed, 'feed')
|
||||
|
||||
logging.user(request.user, "~FGFeed training: ~SB%s" % (feed))
|
||||
|
||||
response = dict(code=code, message=message, payload=payload)
|
||||
return response
|
||||
|
|
|
@ -238,10 +238,10 @@ class UserSubscription(models.Model):
|
|||
self.needs_unread_recalc = False
|
||||
|
||||
self.save()
|
||||
|
||||
if (self.unread_count_positive == 0 and
|
||||
self.unread_count_neutral == 0):
|
||||
self.mark_feed_read()
|
||||
|
||||
# if (self.unread_count_positive == 0 and
|
||||
# self.unread_count_neutral == 0):
|
||||
# self.mark_feed_read()
|
||||
|
||||
cache.delete('usersub:%s' % self.user.id)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue