aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views/feed.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-05-28 15:27:21 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-07-02 15:34:16 +0200
commitbe33517445c787be0da5577da048d4b2d91452d4 (patch)
tree68f281bfb9464f52ea3db18510967613db686545 /pyaggr3g470r/views/feed.py
parentaccelerating the feeds page (diff)
downloadnewspipe-be33517445c787be0da5577da048d4b2d91452d4.tar.gz
newspipe-be33517445c787be0da5577da048d4b2d91452d4.tar.bz2
newspipe-be33517445c787be0da5577da048d4b2d91452d4.zip
adding unread count when listing feeds, using count_by_feed for user management
Diffstat (limited to 'pyaggr3g470r/views/feed.py')
-rw-r--r--pyaggr3g470r/views/feed.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pyaggr3g470r/views/feed.py b/pyaggr3g470r/views/feed.py
index f940e22d..d50d0883 100644
--- a/pyaggr3g470r/views/feed.py
+++ b/pyaggr3g470r/views/feed.py
@@ -23,9 +23,12 @@ feed_bp = Blueprint('feed', __name__, url_prefix='/feed')
@login_required
def feeds():
"Lists the subscribed feeds in a table."
+ art_contr = ArticleController(g.user.id)
return render_template('feeds.html',
feeds=FeedController(g.user.id).read(),
- article_count=ArticleController(g.user.id).count_by_feed())
+ unread_article_count=art_contr.count_by_feed(readed=False),
+ article_count=art_contr.count_by_feed(),
+ )
@feed_bp.route('/<int:feed_id>', methods=['GET'])
bgstack15