From a1a22aa4cec9bff43ba3eced2c3dc85d44b36034 Mon Sep 17 00:00:00 2001 From: David Sevilla Martin Date: Tue, 26 Jul 2016 11:25:05 -0400 Subject: [PATCH] Refresh notifications with discussion list refresh * When clicking "refresh" button for discussion list (on homepage) refresh notifications * When clicking forum title (on homepage) refresh notifications --- js/forum/src/components/IndexPage.js | 6 +++++- js/forum/src/initializers/boot.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/js/forum/src/components/IndexPage.js b/js/forum/src/components/IndexPage.js index 4708f8a7d..35a8178ea 100644 --- a/js/forum/src/components/IndexPage.js +++ b/js/forum/src/components/IndexPage.js @@ -236,7 +236,11 @@ export default class IndexPage extends Page { title: app.translator.trans('core.forum.index.refresh_tooltip'), icon: 'refresh', className: 'Button Button--icon', - onclick: () => app.cache.discussionList.refresh() + onclick: () => { + app.cache.discussionList.refresh(); + app.store.find('users', app.session.user.id()); + m.redraw(); + } }) ); diff --git a/js/forum/src/initializers/boot.js b/js/forum/src/initializers/boot.js index 6aa06a262..827109a3e 100644 --- a/js/forum/src/initializers/boot.js +++ b/js/forum/src/initializers/boot.js @@ -61,6 +61,7 @@ export default function boot(app) { $('#home-link').click(e => { if (e.ctrlKey || e.metaKey || e.which === 2) return; e.preventDefault(); + app.store.find('users', app.session.user.id()); app.history.home(); });