diff options
-rw-r--r-- | newspipe/web/templates/home.html | 3 | ||||
-rw-r--r-- | newspipe/web/views/home.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/newspipe/web/templates/home.html b/newspipe/web/templates/home.html index cb0ac322..a0e7d798 100644 --- a/newspipe/web/templates/home.html +++ b/newspipe/web/templates/home.html @@ -18,7 +18,8 @@ <ul class="nav flex-column" data-offset-top="0" data-offset-bottom="0" style="min-height: 650px;"> <li class="nav-item"><a class="nav-link" href="{{ gen_url(feed=0) }}"> {% if not feed_id %}<b>{% endif %} - {{ _('All feeds') }} <span id="total-unread" class="badge pull-right">{{ articles.__len__() }}</span> + {{ _('All feeds') }} + <span id="total-unread" class="badge pull-right"> {% if nb_unread > 1000 %}>{% endif %} {{ articles.__len__() }}</span> {% if not feed_id %}</b>{% endif %} </a></li> {% for fid, nbunread in unread|dictsort(by='value')|reverse %} diff --git a/newspipe/web/views/home.py b/newspipe/web/views/home.py index d5b583d3..7cf5983c 100644 --- a/newspipe/web/views/home.py +++ b/newspipe/web/views/home.py @@ -27,6 +27,7 @@ def home(): art_contr = ArticleController(current_user.id) unread = art_contr.count_by_feed(readed=False) + nb_unread =art_contr.read_light(readed=False).count() feeds = {feed.id: feed.title for feed in current_user.feeds} @@ -64,6 +65,7 @@ def home(): return render_template( "home.html", + nb_unread=nb_unread, gen_url=gen_url, feed_id=feed_id, filter_=filter_, |