mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Publishing realtime update when marking feed as read, only if it was actually marked as read.
This commit is contained in:
parent
9ad6fa2c9d
commit
ceff5929be
2 changed files with 5 additions and 2 deletions
|
@ -323,6 +323,8 @@ class UserSubscription(models.Model):
|
|||
|
||||
self.save()
|
||||
|
||||
return True
|
||||
|
||||
def mark_story_ids_as_read(self, story_ids, request=None):
|
||||
data = dict(code=0, payload=story_ids)
|
||||
|
||||
|
|
|
@ -1047,8 +1047,9 @@ def mark_feed_as_read(request):
|
|||
continue
|
||||
|
||||
try:
|
||||
sub.mark_feed_read()
|
||||
# r.publish(request.user.username, 'feed:%s' % feed_id)
|
||||
marked_read = sub.mark_feed_read()
|
||||
if marked_read:
|
||||
r.publish(request.user.username, 'feed:%s' % feed_id)
|
||||
except IntegrityError:
|
||||
code = -1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue