diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2016-01-29 14:26:02 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-29 14:26:02 +0100 |
commit | 4098a0de815013c521618b6419d91f997c986ef0 (patch) | |
tree | d8df5e60904924c65dccfd51333b67597b0b30fa /src/web/js/stores/RightPanelStore.js | |
parent | correcting awful middle panel action handling (diff) | |
download | newspipe-4098a0de815013c521618b6419d91f997c986ef0.tar.gz newspipe-4098a0de815013c521618b6419d91f997c986ef0.tar.bz2 newspipe-4098a0de815013c521618b6419d91f997c986ef0.zip |
draft displaying article
Diffstat (limited to 'src/web/js/stores/RightPanelStore.js')
-rw-r--r-- | src/web/js/stores/RightPanelStore.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/web/js/stores/RightPanelStore.js b/src/web/js/stores/RightPanelStore.js index f08be009..68d3b7e9 100644 --- a/src/web/js/stores/RightPanelStore.js +++ b/src/web/js/stores/RightPanelStore.js @@ -26,19 +26,29 @@ var RightPanelStore = assign({}, EventEmitter.prototype, { RightPanelStore.dispatchToken = JarrDispatcher.register(function(action) { switch(action.type) { case ActionTypes.PARENT_FILTER: + RightPanelStore._datas.article = null; if(action.filter_id == null) { RightPanelStore._datas.category = null; RightPanelStore._datas.feed = null; } else if(action.filter_type == 'category_id') { RightPanelStore._datas.category = MenuStore._datas.categories[action.filter_id]; RightPanelStore._datas.feed = null; + RightPanelStore._datas.current = 'category'; } else { RightPanelStore._datas.feed = MenuStore._datas.feeds[action.filter_id]; RightPanelStore._datas.category = MenuStore._datas.categories[RightPanelStore._datas.feed.category_id]; + RightPanelStore._datas.current = 'feed'; } RightPanelStore.emitChange(); break; + case ActionTypes.LOAD_ARTICLE: + RightPanelStore._datas.feed = MenuStore._datas.feeds[action.article.feed_id]; + RightPanelStore._datas.category = MenuStore._datas.categories[action.article.category_id]; + RightPanelStore._datas.article = action.article; + RightPanelStore._datas.current = 'article'; + RightPanelStore.emitChange(); + break; default: // pass } |