diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-03-22 14:30:54 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-03-22 14:30:54 +0100 |
commit | 3d199ce8955c035a5a1bc4569058e2f84ef9cfe0 (patch) | |
tree | e8bb7f02b6b4bae283807577123b851e66eb4bc4 /src/web/js/components/Menu.react.js | |
parent | fix... (diff) | |
download | newspipe-3d199ce8955c035a5a1bc4569058e2f84ef9cfe0.tar.gz newspipe-3d199ce8955c035a5a1bc4569058e2f84ef9cfe0.tar.bz2 newspipe-3d199ce8955c035a5a1bc4569058e2f84ef9cfe0.zip |
fixes
Diffstat (limited to 'src/web/js/components/Menu.react.js')
-rw-r--r-- | src/web/js/components/Menu.react.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/web/js/components/Menu.react.js b/src/web/js/components/Menu.react.js index f4ad76d0..4537ee81 100644 --- a/src/web/js/components/Menu.react.js +++ b/src/web/js/components/Menu.react.js @@ -267,7 +267,22 @@ var Menu = React.createClass({ ); }, componentDidMount: function() { - MenuActions.reload(); + var setFilterFunc = null; + var id = null; + if(window.location.search.substring(1)) { + var args = window.location.search.substring(1).split('&'); + args.map(function(arg) { + if (arg.split('=')[0] == 'at' && arg.split('=')[1] == 'c') { + setFilterFunc = MiddlePanelActions.setCategoryFilter; + } else if (arg.split('=')[0] == 'at' && arg.split('=')[1] == 'f') { + setFilterFunc = MiddlePanelActions.setFeedFilter; + + } else if (arg.split('=')[0] == 'ai') { + id = parseInt(arg.split('=')[1]); + } + }); + } + MenuActions.reload(setFilterFunc, id); MenuStore.addChangeListener(this._onChange); }, componentWillUnmount: function() { |