aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/actions
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-06 23:45:06 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-06 23:45:06 +0200
commit0e42e6d8ce1a056b4426148651b741f345968be2 (patch)
tree982b511677d05142726d92410e0d67ec1d25574b /src/web/js/actions
parentreplace g.user by current_user (diff)
downloadnewspipe-0e42e6d8ce1a056b4426148651b741f345968be2.tar.gz
newspipe-0e42e6d8ce1a056b4426148651b741f345968be2.tar.bz2
newspipe-0e42e6d8ce1a056b4426148651b741f345968be2.zip
major problems fixed.
Diffstat (limited to 'src/web/js/actions')
-rw-r--r--src/web/js/actions/MenuActions.js5
-rw-r--r--src/web/js/actions/MiddlePanelActions.js6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/web/js/actions/MenuActions.js b/src/web/js/actions/MenuActions.js
index b9154581..824610d8 100644
--- a/src/web/js/actions/MenuActions.js
+++ b/src/web/js/actions/MenuActions.js
@@ -5,7 +5,7 @@ var jquery = require('jquery');
var MenuActions = {
// PARENT FILTERS
- reload: function() {
+ reload: function(setFilterFunc, id) {
jquery.getJSON('/menu', function(payload) {
JarrDispatcher.dispatch({
type: ActionTypes.RELOAD_MENU,
@@ -18,6 +18,9 @@ var MenuActions = {
crawling_method: payload.crawling_method,
all_unread_count: payload.all_unread_count,
});
+ if(setFilterFunc && id) {
+ setFilterFunc(id);
+ }
});
},
setFilter: function(filter) {
diff --git a/src/web/js/actions/MiddlePanelActions.js b/src/web/js/actions/MiddlePanelActions.js
index f805b7b1..3704e7ec 100644
--- a/src/web/js/actions/MiddlePanelActions.js
+++ b/src/web/js/actions/MiddlePanelActions.js
@@ -140,11 +140,9 @@ var MiddlePanelActions = {
data: JSON.stringify(filters),
url: "/mark_all_as_read",
success: function (payload) {
+ console.log(payload);
JarrDispatcher.dispatch({
- type: ActionTypes.CHANGE_ATTR,
- attribute: 'read',
- value_num: -1,
- value_bool: true,
+ type: ActionTypes.MARK_ALL_AS_READ,
articles: payload.articles,
});
},
bgstack15