diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2016-01-29 20:28:10 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-29 20:28:10 +0100 |
commit | 4c5415754593986d1540820d13dfa34a34ffeed6 (patch) | |
tree | d8a488ae6525155b677b0094aef81f87154a66a3 /src/web/js/stores/MenuStore.js | |
parent | cleaning warnings (diff) | |
download | newspipe-4c5415754593986d1540820d13dfa34a34ffeed6.tar.gz newspipe-4c5415754593986d1540820d13dfa34a34ffeed6.tar.bz2 newspipe-4c5415754593986d1540820d13dfa34a34ffeed6.zip |
impact on menus when loading article
Diffstat (limited to 'src/web/js/stores/MenuStore.js')
-rw-r--r-- | src/web/js/stores/MenuStore.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/web/js/stores/MenuStore.js b/src/web/js/stores/MenuStore.js index 3a87384f..edc90a38 100644 --- a/src/web/js/stores/MenuStore.js +++ b/src/web/js/stores/MenuStore.js @@ -71,6 +71,13 @@ MenuStore.dispatchToken = JarrDispatcher.register(function(action) { }); MenuStore.emitChange(); break; + case ActionTypes.LOAD_ARTICLE: + if(!action.was_read_before) { + MenuStore._datas.categories[action.article.category_id].unread -= 1; + MenuStore._datas.feeds[action.article.feed_id].unread -= 1; + MenuStore.emitChange(); + } + break; default: // do nothing } |