aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/components
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-29 13:02:49 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-29 13:02:49 +0100
commit5eae4cb235abed7a6e8c6ab81226def9dddc0af2 (patch)
tree0b41f30356c4c557fb76ea798c718dd6ee629b56 /src/web/js/components
parentwip right panel (diff)
downloadnewspipe-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.js26
-rw-r--r--src/web/js/components/RightPanel.react.js2
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>
bgstack15