aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/components/Menu.react.js
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-31 18:59:36 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-31 18:59:36 +0100
commit64964d2fcfa73e18b1316d788bacd11e2180bb7d (patch)
tree9c11cbd18ae6bf3a8c852c5e66a7eeb0e131c115 /src/web/js/components/Menu.react.js
parentsaving categ (diff)
downloadnewspipe-64964d2fcfa73e18b1316d788bacd11e2180bb7d.tar.gz
newspipe-64964d2fcfa73e18b1316d788bacd11e2180bb7d.tar.bz2
newspipe-64964d2fcfa73e18b1316d788bacd11e2180bb7d.zip
handling errors from one page app
Diffstat (limited to 'src/web/js/components/Menu.react.js')
-rw-r--r--src/web/js/components/Menu.react.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/web/js/components/Menu.react.js b/src/web/js/components/Menu.react.js
index ad28015c..b68a84eb 100644
--- a/src/web/js/components/Menu.react.js
+++ b/src/web/js/components/Menu.react.js
@@ -32,9 +32,9 @@ var FeedItem = React.createClass({
if(this.props.active) {
classes += " bg-primary";
}
- if(this.props.error_count >= 6) {
+ if(this.props.error_count >= MenuStore._datas.max_error) {
classes += " bg-danger";
- } else if(this.props.error_count > 3) {
+ } else if(this.props.error_count > MenuStore._datas.error_threshold) {
classes += " bg-warning";
}
var title = <span className="title">{this.props.title}</span>;
@@ -97,7 +97,7 @@ var CategoryGroup = React.createClass({
var feeds = this.props.feeds.filter(function(feed) {
if (filter == 'unread' && feed.unread <= 0) {
return false;
- } else if (filter == 'error' && feed.error_count <= 3) {
+ } else if (filter == 'error' && feed.error_count <= MenuStore._datas.error_threshold) {
return false;
}
return true;
@@ -201,7 +201,7 @@ var Menu = React.createClass({
var feeds = [];
var unread = 0;
this.state.categories[cat_id].feeds.map(function(feed_id) {
- if(this.state.feeds[feed_id].error_count > 3) {
+ if(this.state.feeds[feed_id].error_count > MenuStore._datas.error_threshold) {
feed_in_error = true;
}
unread += this.state.feeds[feed_id].unread;
bgstack15