aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/components/MiddlePanel.react.js
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/MiddlePanel.react.js
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/MiddlePanel.react.js')
-rw-r--r--src/web/js/components/MiddlePanel.react.js26
1 files changed, 16 insertions, 10 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)
+ );
},
});
bgstack15