mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
Mark all as read only should work on feeds that have mark read dates older than specified.
This commit is contained in:
parent
1e1528482a
commit
61506e87d7
1 changed files with 5 additions and 3 deletions
|
@ -273,9 +273,11 @@ def mark_all_as_read(request):
|
||||||
if days == 0:
|
if days == 0:
|
||||||
sub.mark_feed_read()
|
sub.mark_feed_read()
|
||||||
else:
|
else:
|
||||||
sub.needs_unread_recalc = True
|
read_date = datetime.datetime.now() - datetime.timedelta(days=days)
|
||||||
sub.mark_read_date = datetime.datetime.now() - datetime.timedelta(days=days)
|
if sub.mark_read_date < read_date:
|
||||||
sub.save()
|
sub.needs_unread_recalc = True
|
||||||
|
sub.mark_read_date = read_date
|
||||||
|
sub.save()
|
||||||
|
|
||||||
data = json.encode(dict(code=code))
|
data = json.encode(dict(code=code))
|
||||||
return HttpResponse(data)
|
return HttpResponse(data)
|
||||||
|
|
Loading…
Add table
Reference in a new issue