aboutsummaryrefslogtreecommitdiff
path: root/src/web/js
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-22 22:43:39 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 23:47:09 +0100
commitb3e0391f53d98b777d6cdb21ba0492c31927a6f0 (patch)
treee6df34c1677b385fae1958da5299512da21fdd19 /src/web/js
parentbumping deps (diff)
downloadnewspipe-b3e0391f53d98b777d6cdb21ba0492c31927a6f0.tar.gz
newspipe-b3e0391f53d98b777d6cdb21ba0492c31927a6f0.tar.bz2
newspipe-b3e0391f53d98b777d6cdb21ba0492c31927a6f0.zip
ordering feeds
Diffstat (limited to 'src/web/js')
-rw-r--r--src/web/js/components/Menu.react.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/web/js/components/Menu.react.js b/src/web/js/components/Menu.react.js
index ef0ec274..7f5f17bc 100644
--- a/src/web/js/components/Menu.react.js
+++ b/src/web/js/components/Menu.react.js
@@ -46,10 +46,13 @@ var Category = React.createClass({
},
render: function() {
var filter = this.props.filter;
+ // filtering according to this.props.filter
var feeds = this.props.feeds.filter(function(feed) {
if (filter == 'unread' && feed.unread <= 0) {return false;}
else if (filter == 'error' && feed.error_count <= 3){return false;}
return true;
+ }).sort(function(feed_a, feed_b){
+ return feed_b.unread - feed_a.unread;
}).map(function(feed) {
return (<FeedItem key={"feed" + feed.id} feed_id={feed.id}
title={feed.title} unread={feed.unread}
bgstack15