Adding socialsubs to mark all as read.

This commit is contained in:
Samuel Clay 2013-04-22 11:25:04 -07:00
parent b12f5ffb66
commit 4a0b698b95
2 changed files with 12 additions and 12 deletions

View file

@ -872,7 +872,9 @@ def mark_all_as_read(request):
days = int(request.POST.get('days', 0)) days = int(request.POST.get('days', 0))
feeds = UserSubscription.objects.filter(user=request.user) feeds = UserSubscription.objects.filter(user=request.user)
for sub in feeds: socialsubs = MSocialSubscription.objects.filter(user_id=request.user.pk)
for subtype in [feeds, socialsubs]:
for sub in subtype:
if days == 0: if days == 0:
sub.mark_feed_read() sub.mark_feed_read()
else: else:

View file

@ -3575,8 +3575,7 @@
var view_not_empty; var view_not_empty;
if (unread_view >= 1) { if (unread_view >= 1) {
view_not_empty = this.model.preference('lock_green_slider') || view_not_empty = NEWSBLUR.assets.feeds.any(function(feed) {
NEWSBLUR.assets.feeds.any(function(feed) {
return feed.get('ps'); return feed.get('ps');
}); });
} else { } else {
@ -3584,7 +3583,6 @@
return feed.get('ps') || feed.get('nt'); return feed.get('ps') || feed.get('nt');
}); });
} }
$(".NB-feeds-list-empty").remove(); $(".NB-feeds-list-empty").remove();
if (!view_not_empty && !all_mode) { if (!view_not_empty && !all_mode) {
var $empty = $.make("div", { className: "NB-feeds-list-empty" }, [ var $empty = $.make("div", { className: "NB-feeds-list-empty" }, [