From b4c3c6f20a9dcd30705143cf364fba784dce574f Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Wed, 6 Aug 2014 05:01:00 +0000 Subject: [PATCH] Check for server notifications on hard refresh Closes #3612 - Trigger the loadServerNotifications event from the ApplicationRoute's afterModel hook, which gets called every time the app gets loaded. --- ghost/admin/routes/application.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ghost/admin/routes/application.js b/ghost/admin/routes/application.js index 8cc426fc1c..4b359b8f95 100644 --- a/ghost/admin/routes/application.js +++ b/ghost/admin/routes/application.js @@ -2,6 +2,12 @@ import ShortcutsRoute from 'ghost/mixins/shortcuts-route'; var ApplicationRoute = Ember.Route.extend(SimpleAuth.ApplicationRouteMixin, ShortcutsRoute, { + afterModel: function (model, transition) { + if (this.get('session').isAuthenticated) { + transition.send('loadServerNotifications'); + } + }, + shortcuts: { 'esc': 'closePopups' },