diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2016-01-29 13:02:49 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-29 13:02:49 +0100 |
commit | 5eae4cb235abed7a6e8c6ab81226def9dddc0af2 (patch) | |
tree | 0b41f30356c4c557fb76ea798c718dd6ee629b56 /src/web/js/components | |
parent | wip right panel (diff) | |
download | newspipe-5eae4cb235abed7a6e8c6ab81226def9dddc0af2.tar.gz newspipe-5eae4cb235abed7a6e8c6ab81226def9dddc0af2.tar.bz2 newspipe-5eae4cb235abed7a6e8c6ab81226def9dddc0af2.zip |
correcting awful middle panel action handling
Diffstat (limited to 'src/web/js/components')
-rw-r--r-- | src/web/js/components/MiddlePanel.react.js | 26 | ||||
-rw-r--r-- | src/web/js/components/RightPanel.react.js | 2 |
2 files changed, 17 insertions, 11 deletions
diff --git a/src/web/js/components/MiddlePanel.react.js b/src/web/js/components/MiddlePanel.react.js index 4fe14c09..a46d7346 100644 --- a/src/web/js/components/MiddlePanel.react.js +++ b/src/web/js/components/MiddlePanel.react.js @@ -163,22 +163,28 @@ var MiddlePanelFilter = React.createClass({ ); }, setAllFilter: function() { - this.setState({filter: 'all'}); - MiddlePanelActions.setFilter('all'); + this.setState({filter: 'all'}, function() { + MiddlePanelActions.setFilter('all'); + }.bind(this)); }, setUnreadFilter: function() { - this.setState({filter: 'unread'}); - MiddlePanelActions.setFilter('unread'); + this.setState({filter: 'unread'}, function() { + MiddlePanelActions.setFilter('unread'); + }.bind(this)); }, setLikedFilter: function() { - this.setState({filter: 'liked'}); - MiddlePanelActions.setFilter('liked'); + this.setState({filter: 'liked'}, function() { + MiddlePanelActions.setFilter('liked'); + }.bind(this)); }, toogleSearch: function() { - if(this.state.display_search) { - MiddlePanelActions.search_off(); - } - this.setState({display_search: !this.state.display_search}); + this.setState({display_search: !this.state.display_search}, + function() { + if(!this.state.display_search) { + MiddlePanelActions.search_off(); + } + }.bind(this) + ); }, }); diff --git a/src/web/js/components/RightPanel.react.js b/src/web/js/components/RightPanel.react.js index a1e15e94..00e2dd54 100644 --- a/src/web/js/components/RightPanel.react.js +++ b/src/web/js/components/RightPanel.react.js @@ -21,7 +21,7 @@ var Feed = React.createClass({ var header = (<h4> {icon}<strong>Title:</strong> {this.props.feed.title} </h4>); - return (<Panel header={header}> + return (<Panel collapsible defaultExpanded header={header}> <dl className="dl-horizontal"> <dt>Description</dt> <dd>{this.props.feed.description}</dd> |