From 3d199ce8955c035a5a1bc4569058e2f84ef9cfe0 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 22 Mar 2016 14:30:54 +0100 Subject: fixes --- src/web/js/actions/MenuActions.js | 5 ++++- src/web/js/actions/MiddlePanelActions.js | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/web/js/actions') 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..efae516a 100644 --- a/src/web/js/actions/MiddlePanelActions.js +++ b/src/web/js/actions/MiddlePanelActions.js @@ -141,10 +141,7 @@ var MiddlePanelActions = { url: "/mark_all_as_read", success: function (payload) { JarrDispatcher.dispatch({ - type: ActionTypes.CHANGE_ATTR, - attribute: 'read', - value_num: -1, - value_bool: true, + type: ActionTypes.MARK_ALL_AS_READ, articles: payload.articles, }); }, -- cgit