aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/actions
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 22:43:18 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 23:47:57 +0100
commitdf8d1742d7e8ac6a7d238799dda05557fd0d17a9 (patch)
treebecc78a3f23e77c5e8b126d8080ca83214830dc7 /src/web/js/actions
parentressucitating old js (diff)
downloadnewspipe-df8d1742d7e8ac6a7d238799dda05557fd0d17a9.tar.gz
newspipe-df8d1742d7e8ac6a7d238799dda05557fd0d17a9.tar.bz2
newspipe-df8d1742d7e8ac6a7d238799dda05557fd0d17a9.zip
optim on filter, not rerendering
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