aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/js/actions')
-rw-r--r--src/web/js/actions/MenuActions.js17
-rw-r--r--src/web/js/actions/MiddlePanelActions.js16
2 files changed, 4 insertions, 29 deletions
diff --git a/src/web/js/actions/MenuActions.js b/src/web/js/actions/MenuActions.js
index bf039fd1..4266c207 100644
--- a/src/web/js/actions/MenuActions.js
+++ b/src/web/js/actions/MenuActions.js
@@ -15,25 +15,12 @@ var MenuActions = {
});
});
},
- setFilterAll: function() {
+ setFilter: function(filter) {
JarrDispatcher.dispatch({
type: ActionTypes.MENU_FILTER,
- filter: 'all',
+ filter: filter,
});
},
- setFilterUnread: function() {
- JarrDispatcher.dispatch({
- type: ActionTypes.MENU_FILTER,
- filter: 'unread',
- });
- },
- setFilterError: function() {
- JarrDispatcher.dispatch({
- type: ActionTypes.MENU_FILTER,
- filter: 'error',
- });
- },
-
};
module.exports = MenuActions;
diff --git a/src/web/js/actions/MiddlePanelActions.js b/src/web/js/actions/MiddlePanelActions.js
index 7c956e85..47a9958c 100644
--- a/src/web/js/actions/MiddlePanelActions.js
+++ b/src/web/js/actions/MiddlePanelActions.js
@@ -73,22 +73,10 @@ var MiddlePanelActions = {
filter_id: feed_id,
});
},
- setFilterAll: function() {
+ setFilter: function(filter) {
reloadIfNecessaryAndDispatch({
type: ActionTypes.MIDDLE_PANEL_FILTER,
- filter: 'all',
- });
- },
- setFilterUnread: function() {
- reloadIfNecessaryAndDispatch({
- type: ActionTypes.MIDDLE_PANEL_FILTER,
- filter: 'unread',
- });
- },
- setFilterLiked: function() {
- reloadIfNecessaryAndDispatch({
- type: ActionTypes.MIDDLE_PANEL_FILTER,
- filter: 'liked',
+ filter: filter,
});
},
changeRead: function(category_id, feed_id, article_id, new_value){
bgstack15