From 1baaf39c481c8cc85de510cc340c1eeb219a91e0 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 3 Jul 2015 16:29:41 +0100 Subject: [PATCH] update notification button when permission granted --- src/controllers/atoms/EnableNotificationsButton.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/atoms/EnableNotificationsButton.js b/src/controllers/atoms/EnableNotificationsButton.js index 02d99f65..33bc270a 100644 --- a/src/controllers/atoms/EnableNotificationsButton.js +++ b/src/controllers/atoms/EnableNotificationsButton.js @@ -43,7 +43,9 @@ module.exports = { enable: function() { if (!this.havePermission()) { - global.Notification.requestPermission(); + global.Notification.requestPermission(function() { + this.forceUpdate(); + }); } if (!global.localStorage) return;