aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/web/views/home.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/web/views/home.py b/src/web/views/home.py
index dfda381a..f53299dc 100644
--- a/src/web/views/home.py
+++ b/src/web/views/home.py
@@ -97,6 +97,11 @@ def _get_filters(in_dict):
@jsonify
def _articles_to_json(articles, fd_hash=None):
now, locale = datetime.now(), get_locale()
+ fd_hash = {feed.id: {'title': feed.title,
+ 'icon_url': url_for('icon.icon', url=feed.icon_url)
+ if feed.icon_url else None}
+ for feed in FeedController(current_user.id).read()}
+
return {'articles': [{'title': art.title, 'liked': art.like,
'read': art.readed, 'article_id': art.id, 'selected': False,
'feed_id': art.feed_id, 'category_id': art.category_id or 0,
@@ -115,12 +120,8 @@ def _articles_to_json(articles, fd_hash=None):
def get_middle_panel():
filters = _get_filters(request.args)
art_contr = ArticleController(current_user.id)
- fd_hash = {feed.id: {'title': feed.title,
- 'icon_url': url_for('icon.icon', url=feed.icon_url)
- if feed.icon_url else None}
- for feed in FeedController(current_user.id).read()}
- articles = art_contr.read(**filters).order_by(Article.date.desc())
- return _articles_to_json(articles, fd_hash)
+ articles = art_contr.read_light(**filters)
+ return _articles_to_json(articles)
@current_app.route('/getart/<int:article_id>')
bgstack15